diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-06-22 12:07:35 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-22 12:07:35 +0200 |
commit | 6808acb57a286cda48d8674713e672681ca7ffb3 (patch) | |
tree | 77ca408d2453069f6caec40053c4a20e60594c32 /kernel/time | |
parent | kselftests: timers: freq-step: Update maximum acceptable precision and errors (diff) | |
parent | Linux 5.2-rc5 (diff) | |
download | linux-6808acb57a286cda48d8674713e672681ca7ffb3.tar.xz linux-6808acb57a286cda48d8674713e672681ca7ffb3.zip |
Merge branch 'linus' into timers/core
Pick up upstream fixes for pending changes.
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timekeeping.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 85f5912d8f70..44b726bab4bd 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -808,17 +808,18 @@ ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs) struct timekeeper *tk = &tk_core.timekeeper; unsigned int seq; ktime_t base, *offset = offsets[offs]; + u64 nsecs; WARN_ON(timekeeping_suspended); do { seq = read_seqcount_begin(&tk_core.seq); base = ktime_add(tk->tkr_mono.base, *offset); + nsecs = tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift; } while (read_seqcount_retry(&tk_core.seq, seq)); - return base; - + return base + nsecs; } EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset); |