diff options
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 97bf05baade7..102ad370dddb 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1252,6 +1252,12 @@ unsigned long get_next_timer_interrupt(unsigned long now) | |||
1252 | struct tvec_base *base = __get_cpu_var(tvec_bases); | 1252 | struct tvec_base *base = __get_cpu_var(tvec_bases); |
1253 | unsigned long expires; | 1253 | unsigned long expires; |
1254 | 1254 | ||
1255 | /* | ||
1256 | * Pretend that there is no timer pending if the cpu is offline. | ||
1257 | * Possible pending timers will be migrated later to an active cpu. | ||
1258 | */ | ||
1259 | if (cpu_is_offline(smp_processor_id())) | ||
1260 | return now + NEXT_TIMER_MAX_DELTA; | ||
1255 | spin_lock(&base->lock); | 1261 | spin_lock(&base->lock); |
1256 | if (time_before_eq(base->next_timer, base->timer_jiffies)) | 1262 | if (time_before_eq(base->next_timer, base->timer_jiffies)) |
1257 | base->next_timer = __next_timer_interrupt(base); | 1263 | base->next_timer = __next_timer_interrupt(base); |
@@ -1316,7 +1322,7 @@ void do_timer(unsigned long ticks) | |||
1316 | { | 1322 | { |
1317 | jiffies_64 += ticks; | 1323 | jiffies_64 += ticks; |
1318 | update_wall_time(); | 1324 | update_wall_time(); |
1319 | calc_global_load(); | 1325 | calc_global_load(ticks); |
1320 | } | 1326 | } |
1321 | 1327 | ||
1322 | #ifdef __ARCH_WANT_SYS_ALARM | 1328 | #ifdef __ARCH_WANT_SYS_ALARM |