public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/3] ACPI / x86: boot: Split out acpi_generic_reduce_hw_init() and export
@ 2018-02-20 18:05 Andy Shevchenko
  2018-02-20 18:05 ` [PATCH v5 2/3] ACPI / x86: boot: Not all platforms require acpi_generic_reduced_hw_init() Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Andy Shevchenko @ 2018-02-20 18:05 UTC (permalink / raw)
  To: Thomas Gleixner, H . Peter Anvin, Ingo Molnar, x86,
	Eric Biederman, Rafael J . Wysocki, linux-acpi, Juergen Gross,
	linux-kernel
  Cc: Andy Shevchenko

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

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/include/asm/acpi.h |  4 ++++
 arch/x86/kernel/acpi/boot.c | 22 +++++++++++++---------
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 6609dd7289b5..a303d7b7d763 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -140,6 +140,8 @@ static inline u64 acpi_arch_get_root_pointer(void)
 	return x86_init.acpi.get_root_pointer();
 }
 
+void acpi_generic_reduced_hw_init(void);
+
 #else /* !CONFIG_ACPI */
 
 #define acpi_lapic 0
@@ -149,6 +151,8 @@ static inline void acpi_noirq_set(void) { }
 static inline void acpi_disable_pci(void) { }
 static inline void disable_acpi(void) { }
 
+static inline void acpi_generic_reduced_hw_init(void) { }
+
 #endif /* !CONFIG_ACPI */
 
 #define ARCH_HAS_POWER_INIT	1
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 2aa92094b59d..baa084ecffdb 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -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:
  */
+void __init acpi_generic_reduced_hw_init(void)
+{
+	/*
+	 * Override x86_init functions and bypass legacy PIC in
+	 * hardware reduced ACPI mode.
+	 */
+	x86_init.timers.timer_init	= x86_init_noop;
+	x86_init.irqs.pre_vector_init	= x86_init_noop;
+	legacy_pic			= &null_legacy_pic;
+}
+
 static void __init acpi_reduced_hw_init(void)
 {
-	if (acpi_gbl_reduced_hardware) {
-		/*
-		 * Override x86_init functions and bypass legacy pic
-		 * in Hardware-reduced ACPI mode
-		 */
-		x86_init.timers.timer_init	= x86_init_noop;
-		x86_init.irqs.pre_vector_init	= x86_init_noop;
-		legacy_pic			= &null_legacy_pic;
-	}
+	if (acpi_gbl_reduced_hardware)
+		acpi_generic_reduced_hw_init();
 }
 
 /*
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-03-12 12:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 18:05 [PATCH v5 1/3] ACPI / x86: boot: Split out acpi_generic_reduce_hw_init() and export Andy Shevchenko
2018-02-20 18:05 ` [PATCH v5 2/3] ACPI / x86: boot: Not all platforms require acpi_generic_reduced_hw_init() Andy Shevchenko
2018-02-20 18:42   ` Rafael J. Wysocki
2018-03-12 12:26   ` [tip:x86/mm] ACPI, x86/boot: Introduce the ->reduced_hw_early_init() ACPI callback tip-bot for Andy Shevchenko
2018-02-20 18:05 ` [PATCH v5 3/3] x86/platform/intel-mid: Add special handling of ACPI HW reduced platforms Andy Shevchenko
2018-02-20 18:43   ` Rafael J. Wysocki
2018-03-12 12:26   ` [tip:x86/mm] x86/platform/intel-mid: Add special handling for " tip-bot for Andy Shevchenko
2018-02-20 18:42 ` [PATCH v5 1/3] ACPI / x86: boot: Split out acpi_generic_reduce_hw_init() and export Rafael J. Wysocki
2018-02-23 10:51   ` Andy Shevchenko
2018-03-07 12:56     ` Andy Shevchenko
2018-03-12 11:01       ` Ingo Molnar
2018-03-12 11:18         ` Rafael J. Wysocki
2018-03-12 11:33           ` Ingo Molnar
2018-03-12 11:42             ` Rafael J. Wysocki
2018-03-12 12:25 ` [tip:x86/mm] ACPI, x86/boot: " tip-bot for Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox