Skip to content

Commit 3b62dc6

Browse files
committed
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner: "A single fix for a thinko in the raw timekeeper update which causes clock MONOTONIC_RAW to run with erratically increased frequency" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Fix ktime_get_raw() incorrect base accumulation
2 parents e92d51a + 0bcdc09 commit 3b62dc6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

kernel/time/timekeeping.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,7 @@ static inline void tk_update_ktime_data(struct timekeeper *tk)
637637
tk->ktime_sec = seconds;
638638

639639
/* Update the monotonic raw base */
640-
seconds = tk->raw_sec;
641-
nsec = (u32)(tk->tkr_raw.xtime_nsec >> tk->tkr_raw.shift);
642-
tk->tkr_raw.base = ns_to_ktime(seconds * NSEC_PER_SEC + nsec);
640+
tk->tkr_raw.base = ns_to_ktime(tk->raw_sec * NSEC_PER_SEC);
643641
}
644642

645643
/* must hold timekeeper_lock */

0 commit comments

Comments
 (0)