Skip to content

Commit

Permalink
[PATCH] Fix faulty HPET clocksource usage (fix for bug #7062)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
john stultz authored and Linus Torvalds committed Sep 1, 2006
1 parent 202af6d commit 30f3174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/kernel/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: */
Expand Down

0 comments on commit 30f3174

Please sign in to comment.