time: don't touch an offlined CPU's ts->tick_stopped in tick_cancel_sched_timer()
[sfrench/cifs-2.6.git] / kernel / time / tick-sched.c
index fa9bb73dbdb41c4678ca0ad1da01ebcaf5e46cc1..686da821d376b01dd21d379bfd8baf39d6b106f1 100644 (file)
@@ -282,6 +282,7 @@ void tick_nohz_stop_sched_tick(void)
                        ts->idle_tick = ts->sched_timer.expires;
                        ts->tick_stopped = 1;
                        ts->idle_jiffies = last_jiffies;
+                       rcu_enter_nohz();
                }
 
                /*
@@ -375,6 +376,8 @@ void tick_nohz_restart_sched_tick(void)
                return;
        }
 
+       rcu_exit_nohz();
+
        /* Update jiffies first */
        select_nohz_load_balancer(0);
        now = ktime_get();
@@ -637,7 +640,7 @@ void tick_cancel_sched_timer(int cpu)
 
        if (ts->sched_timer.base)
                hrtimer_cancel(&ts->sched_timer);
-       ts->tick_stopped = 0;
+
        ts->nohz_mode = NOHZ_MODE_INACTIVE;
 }
 #endif /* HIGH_RES_TIMERS */