Re: [PATCH v7 3/7] timekeeping: Account for clocksource tick quantisation via NTP
From: David Woodhouse
Date: Thu Jul 09 2026 - 12:16:57 EST
On Thu, 2026-07-09 at 14:56 +0200, Marek Szyprowski wrote:
>
> This patch landed yesterday in linux-next as commit e8bf3955dc2f
> ("timekeeping: Account for clocksource tick quantisation via NTP").
> In my tests I found that it breaks booting Raspberry Pi 3B and Pi 4B
> boards in ARM 32bit mode with quite old (Debian 10) userspace. Booting
> freezes just before getting a getty login prompt and no more kernel
> or userspace messages are observed. If I start with init=/bin/bash in
> kernel cmdline and then wait a while and do "exec /sbin/init" I get
> the following additional kernel message:
>
> [ 186.867605] Adjusting arch_sys_counter more than 11% (12136 vs 344864995)
>
> then booting freezes again before getting getty prompt.
>
> I can do some more tests, just let me know what will help debugging this
> issue. Other ARM 32bit machines I have work fine with this patch.
>
> Reverting subject together with its dependencies on top of linux-next
> fixes the issue.
Thanks for the report, and the debugging. Does this fix it?
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -352,7 +352,7 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
tk->tkr_raw.cycle_last = tk->tkr_mono.cycle_last;
/* Do the ns -> cycle conversion first, using original mult */
- interval = NTP_INTERVAL_LENGTH << clock->shift;
+ interval = (u64)NTP_INTERVAL_LENGTH << clock->shift;
interval += clock->mult/2;
do_div(interval, clock->mult);
if (interval == 0)