From: Thomas Gleixner Date: Sun, 25 Mar 2007 12:42:51 +0000 (+0200) Subject: [PATCH] clocksource: Fix thinko in watchdog selection X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=948ac6d71cf868b431adb3139d8dfbd9c4e4a6ca;p=openwrt%2Fstaging%2Fblogic.git [PATCH] clocksource: Fix thinko in watchdog selection The watchdog implementation excludes low res / non continuous clocksources from being selected as a watchdog reference unintentionally. Allow using jiffies/PIT as a watchdog reference as long as no better clocksource is available. This is necessary to detect TSC breakage on systems, which have no pmtimer/hpet. The main goal of the initial patch (preventing to switch to highres/nohz when no reliable fallback clocksource is available) is still guaranteed by the checks in clocksource_watchdog(). Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds --- diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 5b0e46b56fd0..fe5c7db24247 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -151,7 +151,8 @@ static void clocksource_check_watchdog(struct clocksource *cs) watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; add_timer(&watchdog_timer); } - } else if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) { + } else { + if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES; if (!watchdog || cs->rating > watchdog->rating) {