aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/clocksource.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/clocksource.c')
-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 }