time: Move clock_was_set_seq update before updating shadow-timekeeper
authorJohn Stultz <[email protected]>
Thu, 11 Jun 2015 22:54:53 +0000 (15:54 -0700)
committerThomas Gleixner <[email protected]>
Fri, 12 Jun 2015 08:56:20 +0000 (10:56 +0200)
commitd151832650ed98961a5650e73e85c349ad7839cb
treee21e07316e96f27af8c99cc57b59ff40725b004f
parent45bbfe64ea564a69e56ab6754006eee506224f46
time: Move clock_was_set_seq update before updating shadow-timekeeper

It was reported that 868a3e915f7f5eba (hrtimer: Make offset
update smarter) was causing timer problems after suspend/resume.

The problem with that change is the modification to
clock_was_set_seq in timekeeping_update is done prior to
mirroring the time state to the shadow-timekeeper. Thus the
next time we do update_wall_time() the updated sequence is
overwritten by whats in the shadow copy.

This patch moves the shadow-timekeeper mirroring to the end
of the function, after all updates have been made, so all data
is kept in sync.

(This patch also affects the update_fast_timekeeper calls which
were also problematically done prior to the mirroring).

Reported-and-tested-by: Jeremiah Mahler <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Cc: Preeti U Murthy <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
kernel/time/timekeeping.c