History

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner: "A set of small fixes: - Repair the ktime_get_coarse() functions so they actually deliver what they are supposed to: tick granular time stamps. The current code missed to add the accumulated nanoseconds part of the timekeeper so the resulting granularity was 1 second. - Prevent the tracer from infinitely recursing into time getter functions in the arm architectured timer by marking these functions notrace - Fix a trivial compiler warning caused by wrong qualifier ordering" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Repair ktime_get_coarse*() granularity clocksource/drivers/arm_arch_timer: Don't trace count reader functions clocksource/drivers/timer-ti-dm: Change to new style declaration

Linus Torvalds committed 7 years ago

Commit efba92d2 parents f763cf8 e3ff9c33 files · +8 −7Browse files

Showing the changes to kernel (1 of 3 files). Show all

Unified · Split

kernel/time/timekeeping.c+3−2
@@ -808,17 +808,18 @@ ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs) · 807 unmodified lines
808 struct timekeeper *tk = &tk_core.timekeeper;808 struct timekeeper *tk = &tk_core.timekeeper;
809 unsigned int seq;809 unsigned int seq;
810 ktime_t base, *offset = offsets[offs];810 ktime_t base, *offset = offsets[offs];
811 u64 nsecs;
811 812
812 WARN_ON(timekeeping_suspended);813 WARN_ON(timekeeping_suspended);
813 814
814 do {815 do {
815 seq = read_seqcount_begin(&tk_core.seq);816 seq = read_seqcount_begin(&tk_core.seq);
816 base = ktime_add(tk->tkr_mono.base, *offset);817 base = ktime_add(tk->tkr_mono.base, *offset);
818 nsecs = tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift;
817 819
818 } while (read_seqcount_retry(&tk_core.seq, seq));820 } while (read_seqcount_retry(&tk_core.seq, seq));
819 821
820 return base;822 return base + nsecs;
821
822}823}
823EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset);824EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset);
824 825