aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/tick-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r--kernel/time/tick-common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 019315ebf9de..b523d095decf 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -33,7 +33,7 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device);
33 */ 33 */
34ktime_t tick_next_period; 34ktime_t tick_next_period;
35ktime_t tick_period; 35ktime_t tick_period;
36int tick_do_timer_cpu __read_mostly = -1; 36int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT;
37DEFINE_SPINLOCK(tick_device_lock); 37DEFINE_SPINLOCK(tick_device_lock);
38 38
39/* 39/*
@@ -148,7 +148,7 @@ static void tick_setup_device(struct tick_device *td,
148 * If no cpu took the do_timer update, assign it to 148 * If no cpu took the do_timer update, assign it to
149 * this cpu: 149 * this cpu:
150 */ 150 */
151 if (tick_do_timer_cpu == -1) { 151 if (tick_do_timer_cpu == TICK_DO_TIMER_BOOT) {
152 tick_do_timer_cpu = cpu; 152 tick_do_timer_cpu = cpu;
153 tick_next_period = ktime_get(); 153 tick_next_period = ktime_get();
154 tick_period = ktime_set(0, NSEC_PER_SEC / HZ); 154 tick_period = ktime_set(0, NSEC_PER_SEC / HZ);
@@ -300,7 +300,8 @@ static void tick_shutdown(unsigned int *cpup)
300 if (*cpup == tick_do_timer_cpu) { 300 if (*cpup == tick_do_timer_cpu) {
301 int cpu = first_cpu(cpu_online_map); 301 int cpu = first_cpu(cpu_online_map);
302 302
303 tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu : -1; 303 tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu :
304 TICK_DO_TIMER_NONE;
304 } 305 }
305 spin_unlock_irqrestore(&tick_device_lock, flags); 306 spin_unlock_irqrestore(&tick_device_lock, flags);
306} 307}