hrtimer: Add a lockdep assertion to hrtimer_update_base()

Document and verify that the hrtimer_cpu_base::lock is held at this point.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260803-auxclock-nanosleep-prep-v2-3-910cbd485390@linutronix.de
This commit is contained in:
Thomas Weißschuh (Schneider Electric)
2026-08-03 12:04:34 +02:00
committed by Thomas Gleixner
parent 406a037ce7
commit d2e6ee3ecb

View File

@@ -677,6 +677,8 @@ static ktime_t hrtimer_update_next_event(struct hrtimer_cpu_base *cpu_base)
static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
{
lockdep_assert_held(&base->lock);
ktime_t *offs_real = &base->clock_base[HRTIMER_BASE_REALTIME].offset;
ktime_t *offs_boot = &base->clock_base[HRTIMER_BASE_BOOTTIME].offset;
ktime_t *offs_tai = &base->clock_base[HRTIMER_BASE_TAI].offset;