Re: [PATCH v2] clocksource/drivers/timer-mediatek: Enable the GPT irq before registering
From: Luca Leonardo Scorcia
Date: Thu Nov 26 2026 - 04:33:37 EST
> Enable the interrupt before registering the clock event. The IRQ line
> stays disabled until enable_irq(), so the handler still can't run before
> the clock event is set up. With the bit set, the timer that
> mtk_gpt_setup() leaves running could latch an interrupt that
> registration doesn't acknowledge, the kind of pending interrupt that
> commit fc686d0037d7 ("clockevents/drivers/mtk: Fix spurious interrupt
> leading to crash") acknowledges in mtk_gpt_enable_irq(). So stop the
> timer before enabling the interrupt, until the core programs an event.
Tested-by: Luca Leonardo Scorcia <l.scorcia@xxxxxxxxx> # MT8167 Sony PSC Mini
--
Luca Leonardo Scorcia
l.scorcia@xxxxxxxxx