For calculating the new timekeeper values store the new cycle_last
value in the timekeeper and update the clock->cycle_last just when we
actually update the new values.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
/* Accumulate one shifted interval */
offset -= interval;
- tk->clock->cycle_last += interval;
+ tk->cycle_last += interval;
tk->xtime_nsec += tk->xtime_interval << shift;
accumulate_nsecs_to_secs(tk);
*/
accumulate_nsecs_to_secs(tk);
+ /* Update clock->cycle_last with the new value */
+ clock->cycle_last = tk->cycle_last;
timekeeping_update(tk, false);
out: