Re: [PATCH] clocksource/i8253: Acquire the lock disabled interrupts.

From: Sebastian Andrzej Siewior
Date: Mon May 05 2025 - 04:31:06 EST


On 2025-04-04 15:31:17 [+0200], To linux-kernel@xxxxxxxxxxxxxxx wrote:
> On x86 during boot, clockevent_i8253_disable() can be invoked via
> x86_late_time_init -> hpet_time_init() -> pit_timer_init() which happens
> with enabled interrupts.
> If some of the old i8253 hardware is actually used then lockdep will
> notice that i8253_lock is used in hardirq context. This causes lockdep
> to complain because it observed the lock being acquired with enabled
> interrupts and in hardirq context.
>
> Make clockevent_i8253_disable() acquire the lock with disabled
> interrupts.
>
> Fixes: c8c4076723dac ("x86/timer: Skip PIT initialization on modern chipsets")
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

A gentle reminder.

Sebastian