[PATCH, resend] x86: adjust setting of tsc_unstable

From: Jan Beulich
Date: Thu Feb 17 2011 - 10:49:42 EST


Directly setting tsc_unstable (as done by dmi_mark_tsc_unstable(),
recently fixed for unsynchronized_tsc()) isn't correct, as it
doesn't enforce the (side) effect of altering clocksource_tsc, thus
still allowing this clock source to be monitored by the watchdog,
eventually leading to a "clocksource unstable" message.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---
arch/x86/include/asm/tsc.h | 2 +-
arch/x86/kernel/tsc.c | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)

--- 2.6.38-rc5/arch/x86/include/asm/tsc.h
+++ 2.6.38-rc5-x86-mark-tsc-unstable/arch/x86/include/asm/tsc.h
@@ -46,7 +46,7 @@ static __always_inline cycles_t vget_cyc
}

extern void tsc_init(void);
-extern void mark_tsc_unstable(char *reason);
+extern void mark_tsc_unstable(const char *reason);
extern int unsynchronized_tsc(void);
extern int check_tsc_unstable(void);
extern unsigned long native_calibrate_tsc(void);
--- 2.6.38-rc5/arch/x86/kernel/tsc.c
+++ 2.6.38-rc5-x86-mark-tsc-unstable/arch/x86/kernel/tsc.c
@@ -800,7 +800,7 @@ static struct clocksource clocksource_ts
#endif
};

-void mark_tsc_unstable(char *reason)
+void mark_tsc_unstable(const char *reason)
{
if (!tsc_unstable) {
tsc_unstable = 1;
@@ -821,9 +821,7 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable);

static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d)
{
- printk(KERN_NOTICE "%s detected: marking TSC unstable.\n",
- d->ident);
- tsc_unstable = 1;
+ mark_tsc_unstable(d->ident);
return 0;
}




--
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/