]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Jun 2019 17:22:56 +0000 (07:22 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Jun 2019 17:22:56 +0000 (07:22 -1000)
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

drivers/clocksource/arm_arch_timer.c
drivers/clocksource/timer-ti-dm.c
kernel/time/timekeeping.c

index b2a951a798e2e9b9cc60b3c1f81ba6e966735bbf..5c69c9a9a6a4f58fdafdc669201a85960f9a0b04 100644 (file)
@@ -149,22 +149,22 @@ u32 arch_timer_reg_read(int access, enum arch_timer_reg reg,
        return val;
 }
 
-static u64 arch_counter_get_cntpct_stable(void)
+static notrace u64 arch_counter_get_cntpct_stable(void)
 {
        return __arch_counter_get_cntpct_stable();
 }
 
-static u64 arch_counter_get_cntpct(void)
+static notrace u64 arch_counter_get_cntpct(void)
 {
        return __arch_counter_get_cntpct();
 }
 
-static u64 arch_counter_get_cntvct_stable(void)
+static notrace u64 arch_counter_get_cntvct_stable(void)
 {
        return __arch_counter_get_cntvct_stable();
 }
 
-static u64 arch_counter_get_cntvct(void)
+static notrace u64 arch_counter_get_cntvct(void)
 {
        return __arch_counter_get_cntvct();
 }
index e40b55a7086f717b3ad268e36a5d2b2f91e58536..5394d9dbdfbc633b4a9662dc1fbc09a2bfd40aed 100644 (file)
@@ -896,7 +896,7 @@ static int omap_dm_timer_remove(struct platform_device *pdev)
        return ret;
 }
 
-const static struct omap_dm_timer_ops dmtimer_ops = {
+static const struct omap_dm_timer_ops dmtimer_ops = {
        .request_by_node = omap_dm_timer_request_by_node,
        .request_specific = omap_dm_timer_request_specific,
        .request = omap_dm_timer_request,
index 85f5912d8f704e42ced9f2c0c889a0855671df38..44b726bab4bd973d8d77d25a6bba354427be18ad 100644 (file)
@@ -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);