提交 30f3174d 编写于 作者: J john stultz 提交者: Linus Torvalds

[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: NJohn Stultz <johnstul@us.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 202af6d5
......@@ -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: */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册