From: John Stultz Date: Wed, 22 Aug 2012 00:30:46 +0000 (-0400) Subject: time: Ensure we normalize the timekeeper in tk_xtime_add X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=784ffcbb96c3a97b4c64fd48b1dfe12ef3fcbcda;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git time: Ensure we normalize the timekeeper in tk_xtime_add Andreas noticed problems with resume on specific hardware after commit 1e75fa8b (time: Condense timekeeper.xtime into xtime_sec) combined with commit b44d50dca (time: Fix casting issue in tk_set_xtime and tk_xtime_add) After some digging I realized we aren't normalizing the timekeeper after the add. Add the missing normalize call. Reported-by: Andreas Schwab Tested-by: Andreas Schwab Signed-off-by: John Stultz Cc: Prarit Bhargava Cc: Ingo Molnar Link: http://lkml.kernel.org/r/1345595449-34965-2-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner --- diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 898bef066a44..258164ae45cc 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)