1 From ff4878089e1eaeac79d57878ad4ea32910fb4037 Mon Sep 17 00:00:00 2001
2 From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
3 Date: Wed, 21 Jul 2010 18:32:37 +0100
4 Subject: x86: Do not try to disable hpet if it hasn't been initialized before
6 From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
8 commit ff4878089e1eaeac79d57878ad4ea32910fb4037 upstream.
10 hpet_disable is called unconditionally on machine reboot if hpet support
11 is compiled in the kernel.
12 hpet_disable only checks if the machine is hpet capable but doesn't make
13 sure that hpet has been initialized.
15 [ tglx: Made it a one liner and removed the redundant hpet_address check ]
17 Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
18 Acked-by: Venkatesh Pallipadi <venki@google.com>
19 LKML-Reference: <alpine.DEB.2.00.1007211726240.22235@kaball-desktop>
20 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24 arch/x86/kernel/hpet.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
27 --- a/arch/x86/kernel/hpet.c
28 +++ b/arch/x86/kernel/hpet.c
29 @@ -949,7 +949,7 @@ fs_initcall(hpet_late_init);
31 void hpet_disable(void)
33 - if (is_hpet_capable()) {
34 + if (is_hpet_capable() && hpet_virt_address) {
35 unsigned long cfg = hpet_readl(HPET_CFG);
37 if (hpet_legacy_int_enabled) {