diff mbox

[1/4] time: Ensure we normalize the timekeeper in tk_xtime_add

Message ID 1345595449-34965-2-git-send-email-john.stultz@linaro.org
State Accepted
Commit 784ffcbb96c3a97b4c64fd48b1dfe12ef3fcbcda
Headers show

Commit Message

John Stultz Aug. 22, 2012, 12:30 a.m. UTC
Andreas noticed problems with resume on specific hardware
after commit 1e75fa8be9fb61e1af46b5b3b176347a4c958ca1
combined with commit b44d50dcacea0d485ca2ff9140f8cc28ee22f28d

After some digging I realized we aren't normalizing
the timekeeper after the add. This patch to correct this
resolved the issue.

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 kernel/time/timekeeping.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 898bef0..258164a 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -115,6 +115,7 @@  static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts)
 {
 	tk->xtime_sec += ts->tv_sec;
 	tk->xtime_nsec += (u64)ts->tv_nsec << tk->shift;
+	tk_normalize_xtime(tk);
 }
 
 static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec wtm)