[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070124154227.GA20726@elte.hu>
Date: Wed, 24 Jan 2007 16:42:27 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Andrew Morton <akpm@...l.org>, LKML <linux-kernel@...r.kernel.org>,
John Stultz <johnstul@...ibm.com>,
Arjan van de Veen <arjan@...radead.org>,
Roman Zippel <zippel@...ux-m68k.org>
Subject: [patch] clocksource: add verification (watchdog) helper, fix
one out of my 10 testsystems didnt properly enter high-res mode (but
safely fell back to low-res mode), the patch below fixes this.
Ingo
---------------------------->
Subject: [patch] clocksource: add verification (watchdog) helper, fix
From: Ingo Molnar <mingo@...e.hu>
if a clocksource is being verified by the watchdog, but the watchdog
clocksource is registered /after/ the possibly-unstable clocksource has
been registered, then when we switch that clocksource into high-res
capable mode we also need to propagate this fact to the rest of the
system - so that it properly switches into high-res mode.
this solves one particular system not entering high-res mode (but
falling back to low-res mode) - with this patch it properly enters
high-res mode:
Switched to high resolution mode on CPU 0
Switched to high resolution mode on CPU 1
Switched to high resolution mode on CPU 2
Switched to high resolution mode on CPU 3
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/time/clocksource.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
Index: linux/kernel/time/clocksource.c
===================================================================
--- linux.orig/kernel/time/clocksource.c
+++ linux/kernel/time/clocksource.c
@@ -28,6 +28,7 @@
#include <linux/sysdev.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/tick.h>
/* XXX - Would like a better way for initializing curr_clocksource */
extern struct clocksource clocksource_jiffies;
@@ -106,8 +107,16 @@ static void clocksource_watchdog(unsigne
/* Initialized ? */
if (!(cs->flags & CLOCK_SOURCE_WATCHDOG)) {
if ((cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) &&
- (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS))
+ (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS)) {
cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES;
+ /*
+ * We just marked the clocksource as
+ * highres-capable, notify the rest of the
+ * system as well so that we transition
+ * into high-res mode:
+ */
+ tick_clock_notify();
+ }
cs->flags |= CLOCK_SOURCE_WATCHDOG;
cs->wd_last = csnow;
} else {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists