Re: [patch] Fix hpet wrong values

From: Ingo Molnar
Date: Wed Nov 28 2007 - 05:41:20 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> ---------------->
> e09e9089131ca0227a716aee143f49d084977e32 is first bad commit
> commit e09e9089131ca0227a716aee143f49d084977e32
> Author: Pavel Machek <pavel@xxxxxx>
> Date: Wed Nov 28 03:06:03 2007 +0100
>
> x86: fix wrong hpet values
> <----------------

it's the hpet_enable() returning non-0 that is causing the crash. The
current patch that is in x86.git is below.

Ingo

------------------->
Subject: x86: fix wrong hpet values
From: Pavel Machek <pavel@xxxxxx>

If hpet is not enabled in config, its init should not pretend to work,
and people should not try to get time from it.

Signed-off-by: Pavel Machek <pavel@xxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/asm-x86/hpet.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Index: linux-x86.q/include/asm-x86/hpet.h
===================================================================
--- linux-x86.q.orig/include/asm-x86/hpet.h
+++ linux-x86.q/include/asm-x86/hpet.h
@@ -82,8 +82,7 @@ extern irqreturn_t hpet_rtc_interrupt(in

#else

-static inline int hpet_enable(void) { return 0; }
-static inline unsigned long hpet_readl(unsigned long a) { return 0; }
+static inline int hpet_enable(void) { return -ENODEV; }

#endif /* CONFIG_HPET_TIMER */
#endif /* ASM_X86_HPET_H */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/