aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-03-19 20:01:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 21:53:37 -0400
commit3150e63df41450a795bbd0bd98a8e70da74e0285 (patch)
treecee77b25ba25abc5c892cfb06fdac92bbd946991 /kernel/time
parentcf821e8f53e3d147ebae03c8c710d2b8842d88a1 (diff)
revert "clocksource: make clocksource watchdog cycle through online CPUs"
Revert commit 1ada5cba6a0318f90e45b38557e7b5206a9cba38 ("clocksource: make clocksource watchdog cycle through online CPUs") due to the regression reported by Gabriel C at http://lkml.org/lkml/2008/2/24/281 (short vesion: it makes TSC be marked as always unstable on his machine). Cc: Andi Kleen <ak@suse.de> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Robert Hancock <hancockr@shaw.ca> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Gabriel C <nix.or.die@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/clocksource.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 548c436a776b..278534bbca95 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -141,13 +141,8 @@ static void clocksource_watchdog(unsigned long data)
141 } 141 }
142 142
143 if (!list_empty(&watchdog_list)) { 143 if (!list_empty(&watchdog_list)) {
144 /* Cycle through CPUs to check if the CPUs stay synchronized to 144 __mod_timer(&watchdog_timer,
145 * each other. */ 145 watchdog_timer.expires + WATCHDOG_INTERVAL);
146 int next_cpu = next_cpu(raw_smp_processor_id(), cpu_online_map);
147 if (next_cpu >= NR_CPUS)
148 next_cpu = first_cpu(cpu_online_map);
149 watchdog_timer.expires += WATCHDOG_INTERVAL;
150 add_timer_on(&watchdog_timer, next_cpu);
151 } 146 }
152 spin_unlock(&watchdog_lock); 147 spin_unlock(&watchdog_lock);
153} 148}
@@ -169,7 +164,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
169 if (!started && watchdog) { 164 if (!started && watchdog) {
170 watchdog_last = watchdog->read(); 165 watchdog_last = watchdog->read();
171 watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; 166 watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
172 add_timer_on(&watchdog_timer, first_cpu(cpu_online_map)); 167 add_timer(&watchdog_timer);
173 } 168 }
174 } else { 169 } else {
175 if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) 170 if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS)
@@ -190,8 +185,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
190 watchdog_last = watchdog->read(); 185 watchdog_last = watchdog->read();
191 watchdog_timer.expires = 186 watchdog_timer.expires =
192 jiffies + WATCHDOG_INTERVAL; 187 jiffies + WATCHDOG_INTERVAL;
193 add_timer_on(&watchdog_timer, 188 add_timer(&watchdog_timer);
194 first_cpu(cpu_online_map));
195 } 189 }
196 } 190 }
197 } 191 }