summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-03 09:30:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-03 09:30:40 -0700
commit3b62dc6c38d15592b46403d10684607d0038481f (patch)
tree9a2a79a359a7f83e243fb62bcdea29a2a1b2da9d /kernel
parente92d51aff5068b96346a45e5118680b3bc3490c2 (diff)
parent0bcdc0987cce9880436b70836c6a92bb8e744fd1 (diff)
downloadlinux-3b62dc6c38d15592b46403d10684607d0038481f.tar.bz2
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timekeeping.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index cedafa008de5..7e7e61c00d61 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -637,9 +637,7 @@ static inline void tk_update_ktime_data(struct timekeeper *tk)
tk->ktime_sec = seconds;
/* Update the monotonic raw base */
- seconds = tk->raw_sec;
- nsec = (u32)(tk->tkr_raw.xtime_nsec >> tk->tkr_raw.shift);
- tk->tkr_raw.base = ns_to_ktime(seconds * NSEC_PER_SEC + nsec);
+ tk->tkr_raw.base = ns_to_ktime(tk->raw_sec * NSEC_PER_SEC);
}
/* must hold timekeeper_lock */