]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Fix faulty HPET clocksource usage (fix for bug #7062)
authorjohn stultz <johnstul@us.ibm.com>
Fri, 1 Sep 2006 04:27:37 +0000 (21:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 1 Sep 2006 18:39:08 +0000 (11:39 -0700)
Apparently some systems export valid HPET addresses, but hpet_enable()
fails.  Then when the HPET clocksource starts up, it only checks for a
valid HPET address, and the result is a system where time does not advance.

See http://bugme.osdl.org/show_bug.cgi?id=7062 for details.

This patch just makes sure we better check that the HPET is functional
before registering the HPET clocksource.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/hpet.c

index c6737c35815db8fff2ede01f0322773eda864a34..17647a530b2f4b927b5a8f40e1d7d88f0acd482c 100644 (file)
@@ -35,7 +35,7 @@ static int __init init_hpet_clocksource(void)
        void __iomem* hpet_base;
        u64 tmp;
 
-       if (!hpet_address)
+       if (!is_hpet_enabled())
                return -ENODEV;
 
        /* calculate the hpet address: */