[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <54FFF81C.20703@linux.intel.com>
Date: Wed, 11 Mar 2015 16:09:00 +0800
From: "Li, Aubrey" <aubrey.li@...ux.intel.com>
To: Ingo Molnar <mingo@...hat.com>
CC: "alan@...ux.intel.com" <alan@...ux.intel.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
"Brown, Len" <len.brown@...el.com>,
"H. Peter Anvin" <hpa@...ux.intel.com>, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH v3]x86: Bypass legacy PIC and PIT in ACPI hardware reduced
mode
On a platform in ACPI Hardware-reduced mode, the legacy PIC and PIT
may not be initialized even though they may be present in silicon.
Touching these legacy components causes unexpected results on the system.
On the Bay Trail-T(ASUS-T100) platform, touching these legacy components
blocks platform hardware low idle power state(S0ix) during system
suspend. So we should bypass them in ACPI hardware reduced mode.
Suggested-by: Arjan van de Ven <arjan@...ux.intel.com>
Signed-off-by: Li Aubrey <aubrey.li@...ux.intel.com>
Cc: Len Brown <len.brown@...el.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: Alan Cox <alan@...ux.intel.com>
---
arch/x86/kernel/acpi/boot.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index b9e30da..adb56cb 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1343,6 +1343,26 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
}
/*
+ * ACPI offers an alternative platform interface model that removes
+ * ACPI hardware requirements for platforms that do not implement
+ * the PC Architecture.
+ *
+ * We initialize the Hardware-reduced ACPI model here
+ */
+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 your system is blacklisted here, but you find that acpi=force
* works for you, please contact linux-acpi@...r.kernel.org
*/
@@ -1541,6 +1561,11 @@ int __init early_acpi_boot_init(void)
*/
early_acpi_process_madt();
+ /*
+ * Hardware-reduced ACPI mode initialization
+ */
+ acpi_reduced_hw_init();
+
return 0;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists