diff options
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r-- | kernel/time/tick-common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index bfda3f7f0716..a96ec9ab3454 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -31,7 +31,7 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device); | |||
31 | */ | 31 | */ |
32 | ktime_t tick_next_period; | 32 | ktime_t tick_next_period; |
33 | ktime_t tick_period; | 33 | ktime_t tick_period; |
34 | static int tick_do_timer_cpu = -1; | 34 | int tick_do_timer_cpu __read_mostly = -1; |
35 | DEFINE_SPINLOCK(tick_device_lock); | 35 | DEFINE_SPINLOCK(tick_device_lock); |
36 | 36 | ||
37 | /* | 37 | /* |
@@ -295,6 +295,12 @@ static void tick_shutdown(unsigned int *cpup) | |||
295 | clockevents_exchange_device(dev, NULL); | 295 | clockevents_exchange_device(dev, NULL); |
296 | td->evtdev = NULL; | 296 | td->evtdev = NULL; |
297 | } | 297 | } |
298 | /* Transfer the do_timer job away from this cpu */ | ||
299 | if (*cpup == tick_do_timer_cpu) { | ||
300 | int cpu = first_cpu(cpu_online_map); | ||
301 | |||
302 | tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu : -1; | ||
303 | } | ||
298 | spin_unlock_irqrestore(&tick_device_lock, flags); | 304 | spin_unlock_irqrestore(&tick_device_lock, flags); |
299 | } | 305 | } |
300 | 306 | ||