aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/hpet.c
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2007-12-03 11:17:10 -0500
committerIngo Molnar <mingo@elte.hu>2007-12-03 11:17:10 -0500
commitc86c7fbc829e27e2a4093f98ded9fbd75e515adb (patch)
tree310d217b4b2e582d84798e65dac309f1d173f1ad /arch/x86/kernel/hpet.c
parent92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c (diff)
x86: disable hpet on shutdown
If HPET was enabled by pci quirks, we use i8253 as initial clockevent because pci quirks doesn't run until pci is initialized. The above means the kernel (or something) is assuming HPET legacy replacement is disabled and can use i8253 at boot. If we used kexec, it isn't true. So, this patch disables HPET legacy replacement for kexec in machine_shutdown(). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/hpet.c')
-rw-r--r--arch/x86/kernel/hpet.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 53303f2e5475..4a86ffd67ec5 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -446,6 +446,20 @@ static __init int hpet_late_init(void)
446} 446}
447fs_initcall(hpet_late_init); 447fs_initcall(hpet_late_init);
448 448
449void hpet_disable(void)
450{
451 if (is_hpet_capable()) {
452 unsigned long cfg = hpet_readl(HPET_CFG);
453
454 if (hpet_legacy_int_enabled) {
455 cfg &= ~HPET_CFG_LEGACY;
456 hpet_legacy_int_enabled = 0;
457 }
458 cfg &= ~HPET_CFG_ENABLE;
459 hpet_writel(cfg, HPET_CFG);
460 }
461}
462
449#ifdef CONFIG_HPET_EMULATE_RTC 463#ifdef CONFIG_HPET_EMULATE_RTC
450 464
451/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET 465/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET