[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 <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by john stultz and committed by Linus Torvalds 30f3174d 202af6d5

+1 -1
+1 -1
arch/i386/kernel/hpet.c
··· 35 35 void __iomem* hpet_base; 36 36 u64 tmp; 37 37 38 - if (!hpet_address) 38 + if (!is_hpet_enabled()) 39 39 return -ENODEV; 40 40 41 41 /* calculate the hpet address: */