[PATCH] time/timekeeping: shadow tk->cycle_last together withclock->cycle_last

From: Sebastian Andrzej Siewior
Date: Tue Apr 30 2013 - 12:53:55 EST

Commit ("timekeeping: Store cycle_last value in timekeeper struct as
well") introduced a tk-> based cycle_last values which needs to be reset
on resume path as well or else ktime_get() will think that time
increased a lot.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
kernel/time/timekeeping.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 99f943b..688817f 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -777,6 +777,7 @@ static void timekeeping_resume(void)
/* re-base the last cycle value */
tk->clock->cycle_last = tk->clock->read(tk->clock);
+ tk->cycle_last = tk->clock->cycle_last;
tk->ntp_error = 0;
timekeeping_suspended = 0;
timekeeping_update(tk, false, true);

So Clark, does this patch fix your problem?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/