From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 F0C6E3AF656 for ; Thu, 9 Jul 2026 16:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783614096; cv=none; b=aDqnWiBhYAG/+eqF7Y/gX+GxsdAm2rihRi26CeB+yBnsIFQTMsU7k7wAGfuLh+cTQXWQmN/sP2P4y1nWVMoxhga1PMd1YgUJbQ17wtOqm/El7Ae4I43KJ2MkFzR//W1BQfyiNjfQt6doDAXLUr+6yVSUaW0Rs+g0cySTILkRZDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783614096; c=relaxed/simple; bh=2kcWefHEcDBoksyoJjAZ2Q1Lo0YSKpr8S4j8TLrW52o=; h=Message-ID:Date:MIME-Version:Subject:To:From:In-Reply-To: Content-Type:References; b=ll3gLwD6Qvg5lFknol1Pb+PmzAgY6kHiX5+FYnj5sv5ycV1dG89wj16ZBMRArs/Rrw2NJ/bp3ogZi9So15qROA78pSafpYo0t87Met7GaGa3UUwYwndbYQZ7VOqpJFiEXi1zPWfvuxFSGJmO09TyBg+MQRCg8cj+0SRL3ND4KUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=q/Dv6kjv; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="q/Dv6kjv" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20260709162132euoutp0179f420477f2f6e37ed0a06ac16ab6c60~Aq5EfjFuf0493204932euoutp01j for ; Thu, 9 Jul 2026 16:21:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20260709162132euoutp0179f420477f2f6e37ed0a06ac16ab6c60~Aq5EfjFuf0493204932euoutp01j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1783614092; bh=FG3Iortjyufhs2bFFOI5mDqpmIWEKhGbb8ecb/sz6sg=; h=Date:Subject:To:From:In-Reply-To:References:From; b=q/Dv6kjvR0Ix4DJl1sat+Okcyyz/6LxmwIS1JYl9D1a7swMx7b13haYnQVondN0pj XzBPA9iO9nqXajc9mclD4n3gkqbYvJ21YI1IcD5NH8QpTFYDiHQOeXmYVLFiw4kg4M YJezNqjPRgR4kC2zUcolvYMaQ3ZPpFUrvwmmUFNM= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20260709162131eucas1p1c57469e2278dfbe5f912a0b14335c9ae~Aq5EKrb8Q2552925529eucas1p18; Thu, 9 Jul 2026 16:21:31 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260709162130eusmtip250b7c94365e0212d62ecd8b81268c24d~Aq5DFupBK2109221092eusmtip24; Thu, 9 Jul 2026 16:21:30 +0000 (GMT) Message-ID: <7f0cc3e3-a9aa-4583-bc94-1b80b82385ad@samsung.com> Date: Thu, 9 Jul 2026 18:21:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: [PATCH v7 3/7] timekeeping: Account for clocksource tick quantisation via NTP To: David Woodhouse , 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 , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Arnd Bergmann , Miroslav Lichvar , Julien Ridoux , Ryan Luu , linux-kernel@vger.kernel.org Content-Language: en-US From: Marek Szyprowski In-Reply-To: Content-Transfer-Encoding: 8bit X-CMS-MailID: 20260709162131eucas1p1c57469e2278dfbe5f912a0b14335c9ae X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20260709125630eucas1p2d1acb4893a1c72dfba5312453c0971f2 X-EPHeader: CA X-CMS-RootMailID: 20260709125630eucas1p2d1acb4893a1c72dfba5312453c0971f2 References: <20260621220051.1030462-1-dwmw2@infradead.org> <20260621220051.1030462-4-dwmw2@infradead.org> On 09.07.2026 18:08, David Woodhouse wrote: > 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? Yes! Feel free to add: Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski > --- 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) > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland