From: Linus Torvalds Date: Mon, 15 Jun 2026 08:09:12 +0000 (+0530) Subject: Merge tag 'timers-core-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git... X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a60ce761d99ff2d9eefe33374c5f20726465a140;p=thirdparty%2Fkernel%2Flinux.git Merge tag 'timers-core-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip Pull timer core updates from Thomas Gleixner: "Updates for the time/timer core subsystem: - Harden the user space controllable hrtimer interfaces further to protect against unpriviledged DoS attempts by arming timers in the past. - Add per-capacity hierarchies to the timer migration code to prevent timer migration accross different capacity domains. This code has been disabled last minute as there is a pathological problem with SoCs which advertise a larger number of capacity domains. The problem is under investigation and the code won't be active before v7.3, but that turned out to be less intrusive than a full revert as it preserves the preparatory steps and allows people to work on the final resolution - Export time namespace functionality as a recent user can be built as a module. - Initialize the jiffies clocksource before using it. The recent hardening against time moving backward requires that the related members of struct clocksource have been initialized, otherwise it clamps the readout to 0, which makes time stand sill and causes boot delays. - Fix a more than twenty year old PID reference count leak in an error path of the POSIX CPU timer code. - The usual small fixes, improvements and cleanups all over the place" * tag 'timers-core-2026-06-13' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip: (31 commits) posix-cpu-timers: Fix pid refcount leak in do_cpu_nanosleep() error path time/jiffies: Register jiffies clocksource before usage timers/migration: Temporarily disable per capacity hierarchies timers/migration: Turn tmigr_hierarchy level_list into a flexible array timers/migration: Deactivate per-capacity hierarchies under nohz_full timers/migration: Fix hotplug migrator selection target on asymetric capacity machines ntsync: Honour caller's time namespace for absolute MONOTONIC timeouts time/namespace: Export init_time_ns and do_timens_ktime_to_host() timers/migration: Update stale @online doc to @available timers: Fix flseep() typo in kernel-doc comment hrtimer: Fix the bogus return type of __hrtimer_start_range_ns() hrtimer: Return ktime_t from hrtimer_get_next_event()/hrtimer_next_event_without() clocksource: Clean up clocksource_update_freq() functions alarmtimer: Remove stale return description from alarm_handle_timer() selftests/posix_timers: Use CLOCK_THREAD_CPUTIME_ID for ITIMER_PROF measurements scripts/timers: Add timer_migration_tree.py timers/migration: Handle capacity in connect tracepoints timers/migration: Split per-capacity hierarchies timers/migration: Track CPUs in a hierarchy timers/migration: Abstract out hierarchy to prepare for CPU capacity awareness ... --- a60ce761d99ff2d9eefe33374c5f20726465a140 diff --cc include/linux/clocksource.h index c5b34c16602e3,c61aa458d4ec0..b12a6d19aa60a --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@@ -236,11 -236,6 +236,9 @@@ clocks_calc_mult_shift(u32 *mult, u32 * */ extern int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); +extern int +__devm_clocksource_register_scale(struct device *dev, struct clocksource *cs, + u32 scale, u32 freq); - extern void - __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq); /* * Don't call this unless you are a default clocksource @@@ -261,28 -256,6 +259,18 @@@ static inline int clocksource_register_ return __clocksource_register_scale(cs, 1000, khz); } +static inline int devm_clocksource_register_hz(struct device *dev, + struct clocksource *cs, u32 hz) +{ + return __devm_clocksource_register_scale(dev, cs, 1, hz); +} + +static inline int devm_clocksource_register_khz(struct device *dev, + struct clocksource *cs, u32 khz) +{ + return __devm_clocksource_register_scale(dev, cs, 1000, khz); +} + - static inline void __clocksource_update_freq_hz(struct clocksource *cs, u32 hz) - { - __clocksource_update_freq_scale(cs, 1, hz); - } - - static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz) - { - __clocksource_update_freq_scale(cs, 1000, khz); - } - #ifdef CONFIG_ARCH_CLOCKSOURCE_INIT extern void clocksource_arch_init(struct clocksource *cs); #else