From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CE5840D57F for ; Thu, 9 Jul 2026 16:09:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783613348; cv=none; b=PRAR3BkMVOaIBuos0aQ6hG+ues931zefVvoPa3L2eiP76FOIHt3jZtRLYEUeojrowhfa9FQjenL8pWXpI5PrAm03diwlBeHXuYXJAJ21WpRUlnbFhGe1lP1n7Ims8GH8q4ttnoETVXPqMt7N1RlWGUQHtEV0zEOzYQP/viehEA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783613348; c=relaxed/simple; bh=nq/MURsCV4OyXRN08I0jiw6NkeqwQPfA6vObFqU+nlI=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=raNw6JpBUkZoK1a3691NcjTcYYvniBFHFjSeM+gnJUkm2EjN7td2xJEjr9VItiXHjDtMWyTAhII4jZEL1EG3z3r4YmaHGDI0NxaskazAzWRdhmq2v5iSH3OR4O6KGvqzGzFRRyGmLZHmL2MV9a6ZLImIcwF2M3i3gw5sI2ATNpI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=casper.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Kkiqt7zS; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=casper.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Kkiqt7zS" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=fQkiUhL1Yvir+OklDFbvJc25lGOMzenj7o2YPiC6/bE=; b=Kkiqt7zSxpbvVB75RtwVbCeiU0 vPHtIqU2zcD10UgUJYsMoZa02WfZIUwUWdA/CJcpA/f/5nhAd1SAVcs3Q54EBsvsaPrEuVsHIQcs8 vhVZUYMJIoYD0LitfGcM57QAEIxUqDSN0/4jOT5VgEkgj63FpYvxuHW3vfb4xhgH8c1DwjjZPWMQd qJrbic6x5T54dGw8rlD1rpRoONh+8Udh3jvUSVrnIXNsBSwKjSK+CxQS/TW3HyK4icVaLTKhx4nKn QK71djMa7HoCwP8EQl1bode0V6RpoRzTVzQlzahdqR8g48QpWFo2ICpvwt6c8Jy6WqvqAcZLE/KcI 8LbBivvQ==; Received: from [2001:8b0:10b:5:72ee:4f8a:770f:a7c2] (helo=u09cd745991455d.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1whrIy-000000059TF-2STP; Thu, 09 Jul 2026 16:08:52 +0000 Message-ID: Subject: Re: [PATCH v7 3/7] timekeeping: Account for clocksource tick quantisation via NTP From: David Woodhouse To: Marek Szyprowski , Richard Cochran , Wen Gu , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Stultz , Thomas Gleixner , Stephen Boyd , Anna-Maria Behnsen , Frederic Weisbecker , Shuah Khan , Peter Zijlstra , Thomas =?ISO-8859-1?Q?Wei=DFschuh?= , Arnd Bergmann , Miroslav Lichvar , Julien Ridoux , Ryan Luu , linux-kernel@vger.kernel.org Date: Thu, 09 Jul 2026 17:08:51 +0100 In-Reply-To: References: <20260621220051.1030462-1-dwmw2@infradead.org> <20260621220051.1030462-4-dwmw2@infradead.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.3-0ubuntu1~ppa9~24.04 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html On Thu, 2026-07-09 at 14:56 +0200, Marek Szyprowski wrote: >=20 > 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=3D/bin/bash in > kernel cmdline and then wait a while and do "exec /sbin/init" I get > the following additional kernel message: >=20 > [=C2=A0 186.867605] Adjusting arch_sys_counter more than 11% (12136 vs 34= 4864995) >=20 > then booting freezes again before getting getty prompt. >=20 > 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. >=20 > Reverting subject together with its dependencies on top of linux-next=C2= =A0 > 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, s= truct clocksource *clock) tk->tkr_raw.cycle_last =3D tk->tkr_mono.cycle_last; =20 /* Do the ns -> cycle conversion first, using original mult */ - interval =3D NTP_INTERVAL_LENGTH << clock->shift; + interval =3D (u64)NTP_INTERVAL_LENGTH << clock->shift; interval +=3D clock->mult/2; do_div(interval, clock->mult); if (interval =3D=3D 0)