Commit 50beba07 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ingo Molnar

ACPI, x86/boot: Split out acpi_generic_reduce_hw_init() and export

This is a preparation patch to allow override the hardware reduced
initialization on ACPI enabled platforms.

No functional change intended.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J . Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-acpi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180220180506.65523-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 24c51785
...@@ -140,6 +140,8 @@ static inline u64 acpi_arch_get_root_pointer(void) ...@@ -140,6 +140,8 @@ static inline u64 acpi_arch_get_root_pointer(void)
return x86_init.acpi.get_root_pointer(); return x86_init.acpi.get_root_pointer();
} }
void acpi_generic_reduced_hw_init(void);
#else /* !CONFIG_ACPI */ #else /* !CONFIG_ACPI */
#define acpi_lapic 0 #define acpi_lapic 0
...@@ -149,6 +151,8 @@ static inline void acpi_noirq_set(void) { } ...@@ -149,6 +151,8 @@ static inline void acpi_noirq_set(void) { }
static inline void acpi_disable_pci(void) { } static inline void acpi_disable_pci(void) { }
static inline void disable_acpi(void) { } static inline void disable_acpi(void) { }
static inline void acpi_generic_reduced_hw_init(void) { }
#endif /* !CONFIG_ACPI */ #endif /* !CONFIG_ACPI */
#define ARCH_HAS_POWER_INIT 1 #define ARCH_HAS_POWER_INIT 1
......
...@@ -1376,17 +1376,21 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) ...@@ -1376,17 +1376,21 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
* *
* We initialize the Hardware-reduced ACPI model here: * We initialize the Hardware-reduced ACPI model here:
*/ */
static void __init acpi_reduced_hw_init(void) void __init acpi_generic_reduced_hw_init(void)
{ {
if (acpi_gbl_reduced_hardware) {
/* /*
* Override x86_init functions and bypass legacy pic * Override x86_init functions and bypass legacy PIC in
* in Hardware-reduced ACPI mode * hardware reduced ACPI mode.
*/ */
x86_init.timers.timer_init = x86_init_noop; x86_init.timers.timer_init = x86_init_noop;
x86_init.irqs.pre_vector_init = x86_init_noop; x86_init.irqs.pre_vector_init = x86_init_noop;
legacy_pic = &null_legacy_pic; legacy_pic = &null_legacy_pic;
} }
static void __init acpi_reduced_hw_init(void)
{
if (acpi_gbl_reduced_hardware)
acpi_generic_reduced_hw_init();
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment