[PATCH] clocksource/drivers/timer-sun4i: Advertise a real minimum delta
Jernej Škrabec
jernej.skrabec at gmail.com
Fri Jun 26 23:48:28 PDT 2026
Dne četrtek, 25. junij 2026 ob 00:04:34 Srednjeevropski poletni čas je Felix Yan napisal(a):
> sun4i_clkevt_next_event() compensates for the timer stop/start
> synchronization delay by programming evt - TIMER_SYNC_TICKS into the
> hardware interval register. The clockevent device currently advertises
> TIMER_SYNC_TICKS as min_delta_ticks, so the clockevents core is allowed
> to call set_next_event() with evt == TIMER_SYNC_TICKS.
>
> That programs a zero-tick interval. With oneshot/highres/nohz timer
> operation this can leave the next event stuck, which was observed as a
> boot hang on Allwinner D1 after the clockevents core started reusing
> forced minimum-delta events.
>
> Advertise one extra tick instead, so the smallest event accepted by the
> core still programs at least one hardware tick after the synchronization
> compensation.
>
> Fixes: 12e1480bcb49 ("clocksource: sun4i: Report the minimum tick that we can program")
> Cc: stable at vger.kernel.org
> Reported-by: Indrek Kruusa <indrek.kruusa at gmail.com>
> Closes: https://lore.kernel.org/linux-riscv/CA+fTLhgLmTY+exGujKf8OYYQvcEW5X5NJ_5sLq2AYL6zER2c0A@mail.gmail.com/
> Assisted-by: Codex:gpt-5.5
> Signed-off-by: Felix Yan <felixonmars at archlinux.org>
Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
Best regards,
Jernej
More information about the linux-riscv
mailing list