[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F67ACC.3010500@linux.intel.com>
Date: Wed, 04 Mar 2015 11:23:56 +0800
From: "Li, Aubrey" <aubrey.li@...ux.intel.com>
To: "H. Peter Anvin" <hpa@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>
CC: arjan@...ux.intel.com, "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len.Brown@...el.com, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: Bypass legacy PIC and PIT on ACPI hardware reduced platform
On ACPI hardware reduced platform, the legacy PIC and PIT may not be
initialized even though they may be present in silicon. Touching
these legacy components causes unexpected result on system.
On 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 on ACPI hardware reduced platform.
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>
---
arch/x86/kernel/irqinit.c | 6 +++++-
arch/x86/kernel/time.c | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 70e181e..9a64cc3 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -75,7 +75,11 @@ void __init init_ISA_irqs(void)
#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
init_bsp_APIC();
#endif
- legacy_pic->init(0);
+ if (acpi_gbl_reduced_hardware) {
+ pr_info("Using NULL legacy PIC\n");
+ legacy_pic = &null_legacy_pic;
+ } else
+ legacy_pic->init(0);
for (i = 0; i < nr_legacy_irqs(); i++)
irq_set_chip_and_handler(i, chip, handle_level_irq);
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index 25adc0e..5ba94fa 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -14,6 +14,7 @@
#include <linux/i8253.h>
#include <linux/time.h>
#include <linux/export.h>
+#include <linux/acpi.h>
#include <asm/vsyscall.h>
#include <asm/x86_init.h>
@@ -76,7 +77,7 @@ void __init setup_default_timer_irq(void)
/* Default timer init function */
void __init hpet_time_init(void)
{
- if (!hpet_enable())
+ if (!hpet_enable() && !acpi_gbl_reduced_hardware)
setup_pit_timer();
setup_default_timer_irq();
}
--
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