History

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.

John Stultz committed 14 years ago

Commit 784ffcb1 parent 4e8b1451 file · +1 −0Browse files

Unified · Split

kernel/time/timekeeping.c+1−0
@@ -115,6 +115,7 @@ static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts) · 114 unmodified lines
115115 {
116116 tk->xtime_sec += ts->tv_sec;
117117 tk->xtime_nsec += (u64)ts->tv_nsec << tk->shift;
118+ tk_normalize_xtime(tk);
118119 }
119120
120121 static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec wtm)