clockevents: prevent stale tick_next_period for onlining CPUs
[firefly-linux-kernel-4.4.55.git] / kernel / time / tick-sched.c
index 31a14e8caac1aab78ff91651e77f0e5e48c245cf..39019b3f76212939ef47903864511bd7e3b5430d 100644 (file)
@@ -75,6 +75,9 @@ static void tick_do_update_jiffies64(ktime_t now)
                                                           incr * ticks);
                }
                do_timer(++ticks);
+
+               /* Keep the tick_next_period variable up to date */
+               tick_next_period = ktime_add(last_jiffies_update, tick_period);
        }
        write_sequnlock(&xtime_lock);
 }