aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 13:23:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 13:23:18 -0400
commit604a830d4fb5bf2334263bd597de22652e63b7e6 (patch)
tree6e7c52a829d3bbad08dc42787b3db150c3457c7d
parent563873318d328d9bbab4b00dfd835ac7c7e28697 (diff)
parent58bfea9532552d422bde7afa207e1a0f08dffa7d (diff)
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 regression introduced in 4.8 which causes the trace/perf clock to return random nonsense if CONFIG_DEBUG_TIMEKEEPING is set" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix __ktime_get_fast_ns() regression
-rw-r--r--kernel/time/timekeeping.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index e07fb093f819..37dec7e3db43 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -403,8 +403,11 @@ static __always_inline u64 __ktime_get_fast_ns(struct tk_fast *tkf)
403 tkr = tkf->base + (seq & 0x01); 403 tkr = tkf->base + (seq & 0x01);
404 now = ktime_to_ns(tkr->base); 404 now = ktime_to_ns(tkr->base);
405 405
406 now += clocksource_delta(tkr->read(tkr->clock), 406 now += timekeeping_delta_to_ns(tkr,
407 tkr->cycle_last, tkr->mask); 407 clocksource_delta(
408 tkr->read(tkr->clock),
409 tkr->cycle_last,
410 tkr->mask));
408 } while (read_seqcount_retry(&tkf->seq, seq)); 411 } while (read_seqcount_retry(&tkf->seq, seq));
409 412
410 return now; 413 return now;