From: john stultz Date: Fri, 1 Sep 2006 04:27:37 +0000 (-0700) Subject: [PATCH] Fix faulty HPET clocksource usage (fix for bug #7062) X-Git-Tag: v3.12-rc1~34152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30f3174d1c506db2c6d2c1dddc9c064e741d6b76;p=kernel%2Fkernel-generic.git [PATCH] Fix faulty HPET clocksource usage (fix for bug #7062) 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c index c6737c3..17647a5 100644 --- a/arch/i386/kernel/hpet.c +++ b/arch/i386/kernel/hpet.c @@ -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: */