]> Git Repo - linux.git/commitdiff
Merge tag 'timers-core-2023-06-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <[email protected]>
Mon, 26 Jun 2023 21:10:45 +0000 (14:10 -0700)
committerLinus Torvalds <[email protected]>
Mon, 26 Jun 2023 21:10:45 +0000 (14:10 -0700)
Pull timer updates from Thomas Gleixner:
 "Time, timekeeping and related device driver updates:

  Core:

   - A set of fixes, cleanups and enhancements to the posix timer code:

       - Prevent another possible live lock scenario in the exit() path,
         which affects POSIX_CPU_TIMERS_TASK_WORK enabled architectures.

       - Fix a loop termination issue which was reported syzcaller/KSAN
         in the posix timer ID allocation code.

         That triggered a deeper look into the posix-timer code which
         unearthed more small issues.

       - Add missing READ/WRITE_ONCE() annotations

       - Fix or remove completely outdated comments

       - Document places which are subtle and completely undocumented.

   - Add missing hrtimer modes to the trace event decoder

   - Small cleanups and enhancements all over the place

  Drivers:

   - Rework the Hyper-V clocksource and sched clock setup code

   - Remove a deprecated clocksource driver

   - Small fixes and enhancements all over the place"

* tag 'timers-core-2023-06-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
  clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
  dt-bindings: timers: Add Ralink SoCs timer
  clocksource/drivers/hyper-v: Rework clocksource and sched clock setup
  dt-bindings: timer: brcm,kona-timer: convert to YAML
  clocksource/drivers/imx-gpt: Fold <soc/imx/timer.h> into its only user
  clk: imx: Drop inclusion of unused header <soc/imx/timer.h>
  hrtimer: Add missing sparse annotations to hrtimer locking
  clocksource/drivers/imx-gpt: Use only a single name for functions
  clocksource/drivers/loongson1: Move PWM timer to clocksource framework
  dt-bindings: timer: Add Loongson-1 clocksource
  MIPS: Loongson32: Remove deprecated PWM timer clocksource
  clocksource/drivers/ingenic-timer: Use pm_sleep_ptr() macro
  tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().
  posix-timers: Add sys_ni_posix_timers() prototype
  tick/rcu: Fix bogus ratelimit condition
  alarmtimer: Remove unnecessary (void *) cast
  alarmtimer: Remove unnecessary initialization of variable 'ret'
  posix-timers: Refer properly to CONFIG_HIGH_RES_TIMERS
  posix-timers: Polish coding style in a few places
  posix-timers: Remove pointless comments
  ...

1  2 
kernel/time/tick-sched.c

diff --combined kernel/time/tick-sched.c
index 42c0be3080bdef7b5ead35e3a994e39d7a0e7e95,89055050d1ac0ed7535331d65c2a45c721f963a5..4df14db4da490d96f340ad4f49c2ea6b2029ddae
@@@ -161,19 -161,8 +161,19 @@@ static ktime_t tick_init_jiffy_update(v
        raw_spin_lock(&jiffies_lock);
        write_seqcount_begin(&jiffies_seq);
        /* Did we start the jiffies update yet ? */
 -      if (last_jiffies_update == 0)
 +      if (last_jiffies_update == 0) {
 +              u32 rem;
 +
 +              /*
 +               * Ensure that the tick is aligned to a multiple of
 +               * TICK_NSEC.
 +               */
 +              div_u64_rem(tick_next_period, TICK_NSEC, &rem);
 +              if (rem)
 +                      tick_next_period += TICK_NSEC - rem;
 +
                last_jiffies_update = tick_next_period;
 +      }
        period = last_jiffies_update;
        write_seqcount_end(&jiffies_seq);
        raw_spin_unlock(&jiffies_lock);
@@@ -1041,7 -1030,7 +1041,7 @@@ static bool report_idle_softirq(void
                        return false;
        }
  
-       if (ratelimit < 10)
+       if (ratelimit >= 10)
                return false;
  
        /* On RT, softirqs handling may be waiting on some lock */
This page took 0.086252 seconds and 4 git commands to generate.