From nobody Sat Jul 25 23:06:36 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0000F372698 for ; Sun, 12 Jul 2026 10:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851652; cv=none; b=UZ8KRQKdm/gKLmAmTi3Z0cQ8bnqys8BWGUNVeq5xuBijYNNxSBpRi5rNlsTeMjRLhk8+aAP8ztHRU8wLaG/L/rbF7SVVcnXd3xY9w36dbf081dA5g5L8Bz9TPcN4uD+6+yvIfU3iBP4cqVHJ3aZ+itwAT6un2UqRc80JrDDTlH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851652; c=relaxed/simple; bh=oSSXLP7Jw1rIzHEsyC+huk83PWweBjE2sp/igTikZ4M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sdE9ZhrqCiSc+yI7erF7W/eN6rYKzcnA5UOr47N2vkEcBq5FAA8cv/qImMtU5Z27WTOPmrjWAqTFNLUFTYnnBgwH6QR9nyhkYLjvFDLQ+n25MnYQc60XW+xf4nVDME+HiPwzYPXqztKZOehCPg1C5I2dqcTp57QizMFmVVmEQ5A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk; spf=pass smtp.mailfrom=thegoodpenguin.co.uk; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b=W5Wqb2sg; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b="W5Wqb2sg" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-4720f3bf164so1559886f8f.1 for ; Sun, 12 Jul 2026 03:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thegoodpenguin-co-uk.20251104.gappssmtp.com; s=20251104; t=1783851649; x=1784456449; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QsBZuNbKBWzgjiOqQ12i1N0POi8kQELijizTKDd75sE=; b=W5Wqb2sgtgLBnBS/+dI+opPyuOIa1eU/sIl7qbLAiJZE5hdie7W12+o+pZ3IjZbvka SSPnjx9fDGrV2oVkY8eb1HxZKsoz910zrFpTzl7GT0+wBSa2p0bLOFRzYtXJhpw3SB/s OJw3B28Klf5Us2tVpssOGfX2KJ9Vi5eLTdJEugLTZbs4smBomsRdvDwcBjFjW61M5scC 2Q+rSEfFBxjogRh/SbsNLJPUmb329fZiCKh2ykGWS6wShGHt5lQMDVse7ztB0GRo37IB 18GIgnQf07ixcgsB3gwc5DTF9uIkblcu0+hO52ZqdCJX3BMbEj9bKtI/2W/KMfKKzIuN OmlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783851649; x=1784456449; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=QsBZuNbKBWzgjiOqQ12i1N0POi8kQELijizTKDd75sE=; b=TwNGOHbmYvPb74QOoHXRMZIcZezAc3ChZ0YF+eYiM63yPwcTcpYwJfbMgYiWEll4oY hN0VUzvLZsH9SDx4+zGdSuoJJryVBOb0wXgvvQCN+fXPZ478mo2QzGhcZ6b2aHQSkQPc 0E6/CfAtIFkoZukardldZ97dW3Sx9JoYLEVoHASPPiTQVp9slftMpXX1wsoBPDvgRw6h DlAPPaYs33TiyybdqJY72BNN20tV+DOaxV1SV10MUJ/5J4LdRarbyBER3HijAl/+d4gF W+P5nd/A6woQKLzdgFB9umYBwh2wwa/mX9LyKRbYSINeHSl0Hu/Lf3MlcKlYU0evrMTS ubCg== X-Gm-Message-State: AOJu0Yy96OAPyJJa4JOwFNsqjgOgqCdrsjLKtuqJgo52V9nvycHNN9Ie 9qcTYp0zDGM8/jahDxeKdlHXclhqU7aoPDiStIwHiZN1jka8tB0B4sXvvQ89mVO71RI= X-Gm-Gg: AfdE7ck9PYWbWK73yZWU1z7WdMehc7bH1hAzIM86N4o9YND3NXcmo055//LdW766tk/ VK8cpG71S8ExJteLNuhV7NEUYNBXDpZ4z9E3i4eBcFLLKz4ddItjzGGJd5pveDsKmS2JsCkhF2N GaTmsZS1BXE3P5HEvoztTThVFsxhmew7a/t95kfyTx5VMZtCYgScyhhho40IM8Q3GtpNV+ZLSmu rrY7sRZmNxuiWEWhTJ65ONxrSaKyG8jwpxtG8DI75VzY3rO2KE3KSOna8VbkpjNIXgKEkFIhsP2 QCSWk2+Oj+kfYj55/8q8qq5oQT0+cX0s7O1ENWCcBPVv03jmHz1pXQpvj2qmVy9sebJpqRZh2ZF FPJahZACMaQAmoDDpO99rscx/xxZrshicb7V7qV8YF0DQRJgxxwRbcVcPNjXJr8HnBzUiGf3MiF FWUmPL63cUCkZt/OFxR6anVt/1INVFLCykI4D0FxYwXV6u+aiwL9/EUUgapbG/IvMHdbKotFGm5 MlTihKDS8X2BMttOqDIO+um3Gcb X-Received: by 2002:a05:6000:4713:b0:473:41c6:f1b9 with SMTP id ffacd0b85a97d-47f2dc863cdmr5646096f8f.11.1783851649453; Sun, 12 Jul 2026 03:20:49 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c5:7815:1301:f27:e3a8:2334:314d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039ad21sm75005672f8f.20.2026.07.12.03.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 03:20:48 -0700 (PDT) From: Andrew Murray Date: Sun, 12 Jul 2026 11:20:32 +0100 Subject: [PATCH v3 1/6] printk: sysctl: use unsigned int for printk_delay Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260712-printkcleanup-v3-1-574547b8f71b@thegoodpenguin.co.uk> References: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> In-Reply-To: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> To: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Andrew Morton , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Clark Williams Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, Andrew Murray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783851646; l=2135; i=amurray@thegoodpenguin.co.uk; s=20250914; h=from:subject:message-id; bh=oSSXLP7Jw1rIzHEsyC+huk83PWweBjE2sp/igTikZ4M=; b=x8nBiQHIvIKnAVgonaWo+uUY7v5twNS6bzsYUhVo0lss1zOJ5+lit0Q0af5u1hiyoIPREE9jR atWY6ieG3qeCEcg54Bgrfwiek8JNG5zWx6/EqttQlWhO1E78dykv/4H X-Developer-Key: i=amurray@thegoodpenguin.co.uk; a=ed25519; pk=0SU0Q8S/uEiCdbXbXS+PvJGUCaBG1nDszD+HPU3Js0Q= As the printk_delay sysctl represents a duration in milliseconds, let's set its type to be unsigned int. Signed-off-by: Andrew Murray Reviewed-by: Petr Mladek --- include/linux/printk.h | 2 +- kernel/printk/printk.c | 4 ++-- kernel/printk/sysctl.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index f594c1266bfd411f2238b45374e8a71222f0407c..ea52dc72b73b64898f82a0319b0= 1c27323b18dee 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -188,7 +188,7 @@ extern int __printk_ratelimit(const char *func); extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, unsigned int interval_msec); =20 -extern int printk_delay_msec; +extern unsigned int printk_delay_msec; extern int dmesg_restrict; =20 extern void wake_up_klogd(void); diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 2fe9a963c823a41e7df10c29939a2abb55462859..31aabdf8248cc39c54ee11685d4= a37deac1c174c 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2117,14 +2117,14 @@ static u8 *__printk_recursion_counter(void) local_irq_restore(flags); \ } while (0) =20 -int printk_delay_msec __read_mostly; +unsigned int printk_delay_msec __read_mostly; =20 static inline void printk_delay(int level) { boot_delay_msec(level); =20 if (unlikely(printk_delay_msec)) { - int m =3D printk_delay_msec; + unsigned int m =3D printk_delay_msec; =20 while (m--) { mdelay(1); diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c index f15732e93c2e9c0865c42e4af9cb6458d4402c0a..56c3db63b3f8c6c5fddc4e4de1f= 41c6102f0f4b1 100644 --- a/kernel/printk/sysctl.c +++ b/kernel/printk/sysctl.c @@ -44,9 +44,9 @@ static const struct ctl_table printk_sysctls[] =3D { { .procname =3D "printk_delay", .data =3D &printk_delay_msec, - .maxlen =3D sizeof(int), + .maxlen =3D sizeof(unsigned int), .mode =3D 0644, - .proc_handler =3D proc_dointvec_minmax, + .proc_handler =3D proc_douintvec_minmax, .extra1 =3D SYSCTL_ZERO, .extra2 =3D (void *)&ten_thousand, }, --=20 2.34.1 From nobody Sat Jul 25 23:06:36 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12BF23A451F for ; Sun, 12 Jul 2026 10:20:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851654; cv=none; b=Wa5cxCtRtFqLG8gEzDmZ+wu5V9IRwZ3CYTGGsonmDLpfi/HcQJh4x9YWAdcPEQp4moeFCKOqULI1LfpHK4r7I5E+0LfQdVsFrunkBojEifOvMQm+5j0heaSlqedMZ9W1BKhW6i3r6N2vJtAy89y9Hen6FyWagdJ/9t2esPH3WxY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851654; c=relaxed/simple; bh=P9s4hcVnWj9tTnGZZIC8g3yyXZe0SBB5hWMsufMT864=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Fo2kDEVPPavYSGyhCpOzIII3Z5lGD3yQWw3tl15ZoBJG4CCom63EBb/z9skqvEy2+Ciay69iHEwmcxBIlR61MOtlmNx0GJBmqCVwoZ0gU5tSoxiSif5zAlKhHk+cAabVlwMvWNXKFsKb88HHutCzfYb+/KdA2UtxohtMnBR/lPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk; spf=pass smtp.mailfrom=thegoodpenguin.co.uk; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b=Vrxp3Xro; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b="Vrxp3Xro" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-475881b9a4bso2191209f8f.3 for ; Sun, 12 Jul 2026 03:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thegoodpenguin-co-uk.20251104.gappssmtp.com; s=20251104; t=1783851651; x=1784456451; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eEbITgTEpDZxe5ZFo5f4LGGlEUTcfS1MEeyafnuEbDQ=; b=Vrxp3XrosyesJK02x9LigsL/JLfBJhi0TYuq+dU3NNN2P1mcnMpIS/Ix2BOjU6Eb1p 5uxAD82SSbCXmUF/kcki6hw9mLI2+ZkOKLVzT1x3AAHM6Jk7D7NxXLdV+qRP4VVClh/n heWBO9zx0Jqmh/66v3eNM77OjUU6eTtzWp02ftm4ztDBMUiwHntIwtM8Qv+aSA6Zb186 hs8uA98I7YKcDkr8jKWSWOwfAYkxSS9/mqsVPl3HQFhB2EBFeXAQ51X3l21CKvq0AW1q LEcpMAp0dJx+rVTlEeB3JxZgzf2SVST5fuGuK34Pk9pCYuggb4QEJ+9ysZNFW8tWt+b+ nVcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783851651; x=1784456451; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eEbITgTEpDZxe5ZFo5f4LGGlEUTcfS1MEeyafnuEbDQ=; b=cRUrXn/Bbqox+Ko00RAQVz04roSFjvCrTt6g4GW+QDFuP4Tfr1LtFdQN/TVH01/ex+ ILmfOIXwPOBbCZ9U7SnNBRUriPdGTRsDkF+KSPl8s0BAjpGGcUHVm/v3YPd42NTMbXBc rm8oonh9TuqqCbgeTf19WRhg8nn2JZEZUbuxDp8hOYGmDIeVfVYjJaXqyt7U1JTTGesr 4v7mHqvleei6DGEZVLvHYtD04RTbfrb1oBr1vOADfUIDTImJG9le1WQkssOiPfUBzfbw 4bz34X20ySKAkGFZI4ycuTDbdXA1RPJgaizyWodTgxds5Ndk72BqUjBbk+zeQ3oWHnzT M39g== X-Gm-Message-State: AOJu0YyCsCCF1TzyB/Rn6+Hr2O4k+tP45ufywpTQVsAYF3xT+TSresFh 2pCOFkyD1PeCGNbrCPIlcIBmbEWuvvbVQyjsCR4La29aXp16CESwE9pxB+U3BGvtORQ= X-Gm-Gg: AfdE7cnHXJykVC3tgv4O2gbF1se9Cj2YDr5UyyZTI+7xlqRw+2+WAQmLFaApSQy554p QR24x2yHmzATbicSlijuPazPYb0VfynOGpnnUOPpyI7kNO8KXQIm92aVfgRQkyb3pSonzRCSlsV epqOBhgwPxEDRAPSNG3o0U7ubEpeN0aUCDhUcb5dwvz2XUo82+9he82oH3iMUwRhELZd6d/Ztv/ vJSAvgJPgKGE9Hu/+ubCx8RvoBa4BpXSh03FsEeWkMUoh9IAeimo7rjTDmZ4jeh+8+sxor1IWAy +O4kjnmo4Fo66Zu22ne1FIQoLXj1vEUpSce09WndotwfSS8NjvKRWONe7UhXw7UERqFAR3RtSpz gLDauF3adQ7An5NIZwILVt46nDn9bwSIQQq06zf4IeJVgswSs7CoymYTgHNHN9SwdH8btiPTLWz lp2AVBbZk875lLyPEwDySGD0v8pBEta/zLV8eMRLltTxxGQcWk/unlrI5Xp+CooedwFbT5MyZbF ovdCbPoyJwTCoajJHIb0nXTVrmt X-Received: by 2002:a05:6000:381:b0:47e:4b05:2c8c with SMTP id ffacd0b85a97d-47f2dcdf16bmr5941928f8f.15.1783851651388; Sun, 12 Jul 2026 03:20:51 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c5:7815:1301:f27:e3a8:2334:314d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039ad21sm75005672f8f.20.2026.07.12.03.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 03:20:50 -0700 (PDT) From: Andrew Murray Date: Sun, 12 Jul 2026 11:20:33 +0100 Subject: [PATCH v3 2/6] printk: add bounds checking to boot_delay Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260712-printkcleanup-v3-2-574547b8f71b@thegoodpenguin.co.uk> References: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> In-Reply-To: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> To: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Andrew Morton , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Clark Williams Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, Andrew Murray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783851646; l=1714; i=amurray@thegoodpenguin.co.uk; s=20250914; h=from:subject:message-id; bh=P9s4hcVnWj9tTnGZZIC8g3yyXZe0SBB5hWMsufMT864=; b=C56SsQSM0G9++0Mvl1+EFh/6zQ8sQqd4MLbaB/EJJ10czH+MgpAwpdrT0cTcbOODbk+gvOJLF SMn+wTwDPCqArrjFNrKnXgbvdRhIhXUkCVLxl10G3JpSuARaONX7gZ2 X-Developer-Key: i=amurray@thegoodpenguin.co.uk; a=ed25519; pk=0SU0Q8S/uEiCdbXbXS+PvJGUCaBG1nDszD+HPU3Js0Q= As the boot_delay kernel parameter represents a duration in milliseconds, let's set its type to be unsigned int and add bounds checking. Please note that the existing pr_debug will only be displayed when boot_delay is non-zero: pr_debug("printk_delay: %u, preset_lpj: %ld, lpj: %lu, " "HZ: %d, loops_per_msec: %llu\n", printk_delay_msec, preset_lpj, lpj, HZ, loops_per_msec); Signed-off-by: Andrew Murray Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 31aabdf8248cc39c54ee11685d4a37deac1c174c..8be562c9be277670ba3209ed1f8= 10fc87175848a 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1291,19 +1291,22 @@ static bool suppress_message_printing(int level) =20 #ifdef CONFIG_BOOT_PRINTK_DELAY =20 -static int boot_delay; /* msecs delay after each printk during bootup */ +static unsigned int boot_delay; /* msecs delay after each printk during bo= otup */ static unsigned long long loops_per_msec; /* based on boot_delay */ =20 static int __init boot_delay_setup(char *str) { unsigned long lpj; + int boot_delay_val; =20 lpj =3D preset_lpj ? preset_lpj : 1000000; /* some guess */ loops_per_msec =3D (unsigned long long)lpj / 1000 * HZ; =20 - get_option(&str, &boot_delay); - if (boot_delay > 10 * 1000) - boot_delay =3D 0; + get_option(&str, &boot_delay_val); + if (boot_delay_val < 0 || boot_delay_val > 10 * 1000) + return 0; + + boot_delay =3D (unsigned int)boot_delay_val; =20 pr_debug("boot_delay: %u, preset_lpj: %ld, lpj: %lu, " "HZ: %d, loops_per_msec: %llu\n", --=20 2.34.1 From nobody Sat Jul 25 23:06:36 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D2D539F187 for ; Sun, 12 Jul 2026 10:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851656; cv=none; b=ddMrgu8SPjItCsu46w0eRMa2TzVUb/PSucZwq+fLx981Mfioq+EkeutArenVeyM/IruL9G4SkE1EpTIkROCmWEGWkO6FfyStMt6hZwA9ZBWARqVTVpNuEwUI5WG0qw6pd2ciDo2ofbyh4ES/skCjxpPbBuo++qtP3QE06z9jf4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851656; c=relaxed/simple; bh=sFOAnCZDwHdC19ns4aSgMCtOItVvq2/+tYcVxQatFt0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iCr2V/7GlzjlMyHnlB91Kk8VbJigaPPoiHMennl8T5BqxujCqmlOz2j+yv45CpY1+CMfNxBr6ope4P8aX0RA8Awy/W+aE5pChEviq9M+oSeFCBl2ZuBrJP/CLO276g8+VCHS+PVUajgT/wNxjYXnz18y1E5OU0CR5aso0mM3iug= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk; spf=pass smtp.mailfrom=thegoodpenguin.co.uk; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b=j9MAdSUq; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b="j9MAdSUq" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-4759b4f0897so1159640f8f.1 for ; Sun, 12 Jul 2026 03:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thegoodpenguin-co-uk.20251104.gappssmtp.com; s=20251104; t=1783851653; x=1784456453; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3cmEd88xf+2l2ruWrORJ5dbUfpxyjcxhWXUHf6Cknms=; b=j9MAdSUq54ceTmof0EWA0cv1i6IN/bOLTX/uqi5K6K6Nv0SKJkza+Po0c98vs9pRW+ 52tfCk9QwS4cUJwynJ23vp/r8W0aGMIZNYGXGs+l+w3Bpk/wRr5P1+/wVjCTNGlshLjd eNEcht4ExcNPX6ipdhAINjsTAddQbk13aNRjTGtDD8tWRwOsIh+nFTFdtC5B5NokFR9W Jmd6gJPZMQm2JMtRYqe2DQbP8aFIqkb54Yiip6tVQ/ScDFzhnsYCaFMXadV0EZCn37GW Wc2tOGrAnOkQeCLvd3uD2h2MofKGEuEqTwaCvUhYhWCODtOUmhIbr0sxMZZR6CPRChDw KP9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783851653; x=1784456453; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3cmEd88xf+2l2ruWrORJ5dbUfpxyjcxhWXUHf6Cknms=; b=aguafDY8x+aa1jyHpv+is1Ku2ZEBR437xjcpNwVvZqo0y5QYOpRbODgFg2oCly4TZQ R7gx7bDZTRilzPxpKmd70K6wzwv3n3bxSXL8XoJ7HlkBoLcT54NuyBysYq5xSbwkisG+ y0x1GMnpeML2ZgP0JnmR7xTIOBLE3NWP2cBM+OJ+SUOWXFfrftN/aqEmqkO15C8w38NB K9K9Tfwq8aa6jDcInZhTUL8NzjNwS1ft4+lRfPL8LI/kCXFLYiC+H7CECA6MuTqvlk2D DxCpWxeZgd/xjYJms3Ic2Xj1kYWuijikwU8KSdfeiL18ogMj0Nd4m0hP18XgLVhEk959 PORw== X-Gm-Message-State: AOJu0Yx2iW1Q1i60lBKDypb5XzDaC9COJsgSufEwn0I6xWI2OkFMkH86 xYTE77Boe2tREU2WXnfxSLv9Q2Lp6IdMW2+NSQ6Me5HUbDOG6BXOEyVhBr1UjXQs744= X-Gm-Gg: AfdE7ckKn8XMenZbDyqdSQRZwa3rGXlj7jweUACEJ4I1uz6GiRVJpewCRHpLwaSsoc1 xziXiE/kskwapdERZY084jT3g8O8GwVeYAaQhwlZd+be7veZNZ49REE53/F9VvAXI8lWvSe31+Y N6Ji5coaYlfG+RFWttcgws7KjM4cHzB2ekYDLTt5pvtBs63x4Mq+J7yx17skPAynrhFM/7ZNGJL HPy/WKkOMkPV2vDFoF8GKSEObWH9UFDJUcMg8nC8EqlE+YGiQka8fRnBkCcZaw4dxSqwGl+cNyt i67voaY7jowqokpMYp9acEfhI2rbMTlo3g6Be7liBeGsVwiyglQ8M1m3+RD4vt6kacdpu8xjpOA ZS7h/tODn8IygijbyNGiUXWmZJ1lfJqOLsepyrozc8YQKzTcZ+lzgCeNP5FiJlcrmrnKPlM5QCg hoI3opAS6xqehrPJ0cYZfMrU15B3B4uTotlvVuIi3PpqJNmQZS9kUh1hqn3LGcIfguBUHKkHqoZ aQA4W4gfDs1VaUwZ/ag7JBY8YBk X-Received: by 2002:a05:6000:26c7:b0:47f:250f:7210 with SMTP id ffacd0b85a97d-47f2dce6d0bmr5100042f8f.49.1783851652901; Sun, 12 Jul 2026 03:20:52 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c5:7815:1301:f27:e3a8:2334:314d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039ad21sm75005672f8f.20.2026.07.12.03.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 03:20:52 -0700 (PDT) From: Andrew Murray Date: Sun, 12 Jul 2026 11:20:34 +0100 Subject: [PATCH v3 3/6] printk: remove BOOT_PRINTK_DELAY config option Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260712-printkcleanup-v3-3-574547b8f71b@thegoodpenguin.co.uk> References: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> In-Reply-To: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> To: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Andrew Morton , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Clark Williams Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, Andrew Murray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783851647; l=3877; i=amurray@thegoodpenguin.co.uk; s=20250914; h=from:subject:message-id; bh=sFOAnCZDwHdC19ns4aSgMCtOItVvq2/+tYcVxQatFt0=; b=JKb1iOGr9kGtjxMDMvrvtANAc8vp0NlTGXG0rX2XOwciPJR5PpOP2CekRiXUGIAQ8Y8GlldxR Dq43rpx2y6RBA5c1bioF14CFC9NgxihKT+Osu3Zk9ZrVt16Z7X8I6Ch X-Developer-Key: i=amurray@thegoodpenguin.co.uk; a=ed25519; pk=0SU0Q8S/uEiCdbXbXS+PvJGUCaBG1nDszD+HPU3Js0Q= The boot_delay (BOOT_PRINTK_DELAY) kernel parameter and printk_delay sysctl are two distinct mechanisms for providing similar functionality which add a delay prior to each printed printk message. In preparation of combining them into a single configurable feature, let's first remove the kconfig option BOOT_PRINTK_DELAY. Reviewed-by: Petr Mladek Signed-off-by: Andrew Murray --- Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/arm/configs/bcm2835_defconfig | 1 - kernel/printk/printk.c | 2 +- lib/Kconfig.debug | 18 ------------------ 4 files changed, 2 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index b5493a7f8f22812833308b22f2cc35b0a42e55b2..2884103b93bca7b76cd3a939462= 76074cf62d0a1 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -651,7 +651,7 @@ Kernel parameters =20 boot_delay=3D [KNL,EARLY] Milliseconds to delay each printk during boot. - Only works if CONFIG_BOOT_PRINTK_DELAY is enabled, + Only works if GENERIC_CALIBRATE_DELAY is enabled, and you may also have to specify "lpj=3D". Boot_delay values larger than 10 seconds (10000) are assumed erroneous and ignored. diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_= defconfig index 4a8ac09843d73280cc42dbbf63fe3cc9f31dacd2..51a1e94d5aa6c22202778082b87= 7a202a6b9c04d 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -174,7 +174,6 @@ CONFIG_NLS_UTF8=3Dy CONFIG_DMA_CMA=3Dy CONFIG_CMA_SIZE_MBYTES=3D32 CONFIG_PRINTK_TIME=3Dy -CONFIG_BOOT_PRINTK_DELAY=3Dy CONFIG_DYNAMIC_DEBUG=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy # CONFIG_ENABLE_MUST_CHECK is not set diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 8be562c9be277670ba3209ed1f810fc87175848a..28e6dff2faa7d4294c1b2ebe284= 4ce5d4dc0e05a 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1289,7 +1289,7 @@ static bool suppress_message_printing(int level) return (level >=3D console_loglevel && !ignore_loglevel); } =20 -#ifdef CONFIG_BOOT_PRINTK_DELAY +#ifdef CONFIG_GENERIC_CALIBRATE_DELAY =20 static unsigned int boot_delay; /* msecs delay after each printk during bo= otup */ static unsigned long long loops_per_msec; /* based on boot_delay */ diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1244dcac2294ad99fda37fa6767c9e76f16a4d14..b552ea51cd53b79cf5d58b8c4de= ff409b1982862 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -99,24 +99,6 @@ config MESSAGE_LOGLEVEL_DEFAULT by default. To change that, use loglevel=3D in the kernel bootargs, or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value. =20 -config BOOT_PRINTK_DELAY - bool "Delay each boot printk message by N milliseconds" - depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY - help - This build option allows you to read kernel boot messages - by inserting a short delay after each one. The delay is - specified in milliseconds on the kernel command line, - using "boot_delay=3DN". - - It is likely that you would also need to use "lpj=3DM" to preset - the "loops per jiffy" value. - See a previous boot log for the "lpj" value to use for your - system, and then set "lpj=3DM" before setting "boot_delay=3DN". - NOTE: Using this option may adversely affect SMP systems. - I.e., processors other than the first one may not boot up. - BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect - what it believes to be lockup conditions. - config DYNAMIC_DEBUG bool "Enable dynamic printk() support" default n --=20 2.34.1 From nobody Sat Jul 25 23:06:36 2026 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FB0C82866 for ; Sun, 12 Jul 2026 10:20:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851661; cv=none; b=c65RlvLnqBsGsKm0ue3Xv9DexKKTGvHuOB/R03Dr3EmhaOUGV0aI8VanoEk0JtT9dN7rjbDaexS3UFxIJGpRUw9Am4s9VsQn3nTUdTcI7uXAD2imGTWUvl6Du88qOsNT6H1aY2iY1AYfs1FpTf8XVRD6gBReCO2NWIwkMz5aMFc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851661; c=relaxed/simple; bh=LbQuTQZ0Pr0m3R7vmjHIVUKClw/nFOcuwqEj3p3Hj4Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=REM4Rl2UdR+ZwLJDiKJrwgKSLsTFmyV2lKkSafDp1xDY5NmpRFYZrTMFIRaNQEOki0KfrUjLrgL/xE7rEjXo8yMxAnKvPoG4fQ+or1ZR2aQIuDnsgM2yS10nErv3dSfcwiR/S9fYfbOSb+QWTT9xrGMsKV+XQLStR66pcDXl3JE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk; spf=pass smtp.mailfrom=thegoodpenguin.co.uk; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b=vS+IOZ7q; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b="vS+IOZ7q" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47d6c634f45so1161099f8f.3 for ; Sun, 12 Jul 2026 03:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thegoodpenguin-co-uk.20251104.gappssmtp.com; s=20251104; t=1783851655; x=1784456455; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/g3zYl79jgjqjNI27fNzLhdq4bY9YgKy83ASVS+p8JI=; b=vS+IOZ7qeMV2j+NvtLmGX8T95arlpXlIAdkRHT8JhOcoKrXkXKOL8yARFE9nJQvMzG Ugh206qJDdJUO+6ERPGqcM6NLb0Bo7nZ2bJncs4Cz+k7voOeyj5GkTcy09fyQtTs2WWz H96GrtZ+eEH4F0regL6BpaBAP9tovYo9kSeNYxBt0KOtl+W4RuP/rrGGKEaQtWPl6okn Xz0UL/blSaREZ/S2V/D5H11uF2TwKKKbIGy2ItUOOpLbQ0yCXcIf4msxPOVX2v2v0E2p 6jxtfI/2P2ax8+sabPCMmPnw/b+6zxleZd+SoJjCWnA3Ayc9/CLjK6W54PhvMuhg5iwF dOVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783851655; x=1784456455; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/g3zYl79jgjqjNI27fNzLhdq4bY9YgKy83ASVS+p8JI=; b=bYgjHxVrNeRR2pv90+S7G7CvYWgsHGUavB6rh/0d+1kbLrJsN4+TUMRn5lnbVdyUJv Ko1uKC2XQ9O9wJWTG8rRisN2SImF53palbYdmUa2RGTYxlT0vvKOtbzBEKZkic/Vyxx0 PRVGPse7pWlOrJWbiXEPLi4QhAcrK2tAnnJuMCF57Tdq9rLw2cA0wZ23Y9hDLO0eoUGc vpqSQDM/v5y0JylwX/MHMZ4MHKQRPfXERDD6SlTONKnzswHBDV4uTeSXH9FGBCj2HIFJ Wij4jbXPWwPhJY9ppYMfkyPVTevsVydxYVRmsWLjZfIKJJT5ynczKZsYJaa1pBhSFYEH 6GfQ== X-Gm-Message-State: AOJu0YyZ64q3ReNNd7l4oVyZ1qbIVBUPClJoZgwX13TvkzOlSqR+ZDLR SAahEbDqW274uqHibkD1K5jqqUrhHFeylj5mskZzHCvxcRUbobrvCl64BrDm0yy1WNs= X-Gm-Gg: AfdE7clzXOl33siORSwedblWt9jN7yu/8WyHrsYBWxrUDK5ZL1NDlkYvD/uOM96BJ8+ n+n7NT2Rczq6B5r5Cpk/aRzk/7xnztvjainnRAdE4Mio2n5yioC34dnD5iMwQ3bmPf1vCItkXzw sqQT1SO1eWDMmYSvCE02Y4YeSHjV73wBeNdPf4jiBi6B1c/OAIa6QuDxjs0cTRnIPEqhCRLGCHx QDC94fbrPBAD6hd964+jtvzgOjxu6axevm9N1Ede/MKv7pG+jqYk69Jmo5bwIJt/z+wfFRVDMsp /iYr5vK1bmZRYZMbMPXb10S2lWNtjwKQatMDMEnfzRzHv/pDezpOCrdlC0uveB5DJ3J6EtOMEyd 3C7CrT4yTmleO5BZ0eqyPmeO3QPg/cmzKulg2BhhMOgi2XiBWGGVGBc1RVuzhc/PNoEYqX03jld 3EBQTSJgoOmovwy26sYgGU2D7GtkUQJmBIgQH/5icD9PuPHSFYluUvfBSdNTwgWfKP1YXHAGecE LisTrUf3pEO23FWJ8iIv7MlLlKs X-Received: by 2002:adf:f3c7:0:b0:47f:2de3:b34d with SMTP id ffacd0b85a97d-47f2de3b435mr3662291f8f.46.1783851654747; Sun, 12 Jul 2026 03:20:54 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c5:7815:1301:f27:e3a8:2334:314d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039ad21sm75005672f8f.20.2026.07.12.03.20.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 03:20:53 -0700 (PDT) From: Andrew Murray Date: Sun, 12 Jul 2026 11:20:35 +0100 Subject: [PATCH v3 4/6] printk: deprecate boot_delay in favour of printk_delay Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260712-printkcleanup-v3-4-574547b8f71b@thegoodpenguin.co.uk> References: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> In-Reply-To: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> To: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Andrew Morton , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Clark Williams Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, Andrew Murray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783851647; l=4810; i=amurray@thegoodpenguin.co.uk; s=20250914; h=from:subject:message-id; bh=LbQuTQZ0Pr0m3R7vmjHIVUKClw/nFOcuwqEj3p3Hj4Y=; b=R41m4NO6PR52KYXcKNaMGQef3mF4qMXlCyOa+etGfe9PI3pHfH2n12uQ921q9TEyV5MQ7i1Ck /UOSQgcFAYlAbGVI6lYGPv+gPu/l+5sphbueqDTDmrG+ar9Raust9yH X-Developer-Key: i=amurray@thegoodpenguin.co.uk; a=ed25519; pk=0SU0Q8S/uEiCdbXbXS+PvJGUCaBG1nDszD+HPU3Js0Q= The boot_delay (BOOT_PRINTK_DELAY) kernel parameter and printk_delay sysctl are two distinct mechanisms for providing similar functionality which add a delay prior to each printed printk message. boot_delay provides a kernel parameter for delaying printk output from kernel start through to boot (SYSTEM_RUNNING), whereas printk_delay is configurable only via sysctl and thus is only used post boot. Let's deprecate the boot_delay feature in favour of printk_delay. In order to preserve functionality, we'll also extend printk_delay such that it can additionally configured via an early kernel parameter. Behavior change: The delay enabled by both "boot_delay" and "printk_delay" continues working even in SYSTEM_RUNNING state. It must be explicitly stopped by setting printk_delay=3D0 via sysctl. The delay is skipped when the message is suppressed in all system states. It used to skipped only for the boot_delay. Signed-off-by: Andrew Murray Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 81 +++++++++++++++++++++++++++++++---------------= ---- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 28e6dff2faa7d4294c1b2ebe2844ce5d4dc0e05a..4517266e9ca112e0dcb0163a99d= d0e8d50931848 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1291,43 +1291,28 @@ static bool suppress_message_printing(int level) =20 #ifdef CONFIG_GENERIC_CALIBRATE_DELAY =20 -static unsigned int boot_delay; /* msecs delay after each printk during bo= otup */ static unsigned long long loops_per_msec; /* based on boot_delay */ =20 -static int __init boot_delay_setup(char *str) +static void __init printk_delay_calculate(void) { unsigned long lpj; - int boot_delay_val; =20 lpj =3D preset_lpj ? preset_lpj : 1000000; /* some guess */ loops_per_msec =3D (unsigned long long)lpj / 1000 * HZ; =20 - get_option(&str, &boot_delay_val); - if (boot_delay_val < 0 || boot_delay_val > 10 * 1000) - return 0; - - boot_delay =3D (unsigned int)boot_delay_val; - - pr_debug("boot_delay: %u, preset_lpj: %ld, lpj: %lu, " + pr_debug("printk_delay: %u, preset_lpj: %ld, lpj: %lu, " "HZ: %d, loops_per_msec: %llu\n", - boot_delay, preset_lpj, lpj, HZ, loops_per_msec); - return 0; + printk_delay_msec, preset_lpj, lpj, HZ, loops_per_msec); } -early_param("boot_delay", boot_delay_setup); =20 -static void boot_delay_msec(int level) +static void early_boot_delay_msec(void) { unsigned long long k; unsigned long timeout; - bool suppress =3D !is_printk_force_console() && - suppress_message_printing(level); - - if ((boot_delay =3D=3D 0 || system_state >=3D SYSTEM_RUNNING) || suppress) - return; =20 - k =3D (unsigned long long)loops_per_msec * boot_delay; + k =3D (unsigned long long)loops_per_msec * printk_delay_msec; =20 - timeout =3D jiffies + msecs_to_jiffies(boot_delay); + timeout =3D jiffies + msecs_to_jiffies(printk_delay_msec); while (k) { k--; cpu_relax(); @@ -1342,11 +1327,37 @@ static void boot_delay_msec(int level) } } #else -static inline void boot_delay_msec(int level) +static inline void __init printk_delay_calculate(void) +{ +} + +static inline void early_boot_delay_msec(void) { } #endif =20 +static int __init printk_delay_setup(char *str) +{ + int printk_delay_val =3D 0; + + get_option(&str, &printk_delay_val); + if (printk_delay_val < 0 || printk_delay_val > 10 * 1000) + return 0; + + printk_delay_msec =3D (unsigned int)printk_delay_val; + printk_delay_calculate(); + + return 0; +} +early_param("printk_delay", printk_delay_setup); + +static int __init boot_delay_setup(char *str) +{ + pr_warn("boot_delay will soon be deprecated, please use printk_delay inst= ead\n"); + return printk_delay_setup(str); +} +early_param("boot_delay", boot_delay_setup); + static bool printk_time =3D IS_ENABLED(CONFIG_PRINTK_TIME); module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); =20 @@ -2122,18 +2133,28 @@ static u8 *__printk_recursion_counter(void) =20 unsigned int printk_delay_msec __read_mostly; =20 +static inline void late_boot_delay_msec(void) +{ + unsigned int m =3D printk_delay_msec; + + while (m--) { + mdelay(1); + touch_nmi_watchdog(); + } +} + static inline void printk_delay(int level) { - boot_delay_msec(level); + bool suppress =3D !is_printk_force_console() && + suppress_message_printing(level); =20 - if (unlikely(printk_delay_msec)) { - unsigned int m =3D printk_delay_msec; + if (likely(!printk_delay_msec) || suppress) + return; =20 - while (m--) { - mdelay(1); - touch_nmi_watchdog(); - } - } + if (system_state < SYSTEM_RUNNING) + early_boot_delay_msec(); + else + late_boot_delay_msec(); } =20 #define CALLER_ID_MASK 0x80000000 --=20 2.34.1 From nobody Sat Jul 25 23:06:36 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E791399013 for ; Sun, 12 Jul 2026 10:21:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851664; cv=none; b=UsSu4ycEnrYA7eIRIr2dYBM2fi+ihm8xtfpXhvvBe90OUnO68u09pzbJvuunGQtzR/3AH9kc3h98XGPJPEec0xV2pDzbhQScjf0nE36cW/vM9ZUkw2OKtizz5fCaeUzzHWigRK684AJCZ8b/rIbjnqB13+fFaxmqbCbqiCdtJNg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851664; c=relaxed/simple; bh=xTPk7bMacGsIS4hNT11NNaci9eKHhXtcV+ZSTG0lKOA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Tv1uvLT4CZMOu40acXrLUOx4VrQqbPXu/ng6wfvKWMv6P5zS63uZqco75spEm2OUyIJqXl+MBdJut1F2qrUWd4J3OhPuSeDFu6KEJxnER91FlVr5UReBHCHL90iOi+fD8MVhK96LcGSa7NBZb8HSSwILfbRm4R816XJSWNPIWiw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk; spf=pass smtp.mailfrom=thegoodpenguin.co.uk; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b=RsVsmPuv; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b="RsVsmPuv" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-47362928f65so2193954f8f.2 for ; Sun, 12 Jul 2026 03:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thegoodpenguin-co-uk.20251104.gappssmtp.com; s=20251104; t=1783851657; x=1784456457; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=R4okvR3IhWuHkCCKPiXQFEOz843paGIoXKBrsbvfXgQ=; b=RsVsmPuvkY/M7Jy8etBEKBQOquwy0B/0jRpFxFEU8VBwzgVH5E/4gKP/W3Q+Nj29Oq 4GtuC+rtlYF8086rmMcd/4YoU/f2YvzWltgWXYmtqrST1wcZ1/KM218DOHK++Lua97dc kBO/dlmkXIK00BnykFTo1qRj6R/A+TOZy6PnH/P0Hqrc3ovLoqv2bFludOKPfafl/Zp9 OFEQvPesoSgUkcdO43LNFl6H6IAeiU/mHmsyGAX2h/SEBrPBBjPBm8B65zABcSrfjjf5 pIjqyHTXDiG3LlmB04mXZv/8WzHuVremWA3BFYb8E7fhJQezvrSnxSEN/Nc/0QRjPgJe SuVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783851657; x=1784456457; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=R4okvR3IhWuHkCCKPiXQFEOz843paGIoXKBrsbvfXgQ=; b=Efd/wr0Q+PioU2A/oJhwB8n0C4mDErvTkeML7pvkWI3Vg16WHgslnDf1SCFkBvmDlo 1FttnpVRVoPn7cJiiBBWAEYNzPkwOTnyJRb9DhhISbKEVvSfUha+Rj9/g6HGX59XUPEb LrnrsWsB9Pg6nAp2qLSppfwejAwUAZCUOUWJOALEsSS8FiF5+sQDDxQ88SqgO031fsKy fsXwanda4h1aTgV2GJFTnhaWBYKsf0tsXwBpPdgS+JOZuFxmhTBsG4nqn29V3UTj3MjJ 33RhGhnzKipZiFi2pAZBmN2fPsNu75GuBJO6Tu5qVk1vC790F0UqvssVTTNwutY+eSB2 GucA== X-Gm-Message-State: AOJu0YzSm95mC18Iu3XqRPP9Z8qg6KrUqaRDI7LX4H8U4d3vd8NYJguX r5tnsIhhOg/Xt2VMLRBn16uqPQ9PCIO9hLV5SSMMvtmxz4u33N3dlVV5/x4QnPcJSts= X-Gm-Gg: AfdE7clQg5ByRW9wdFKsy4/+qt2SIykmssCjK2lL9IaGliXLpJU9jyKAcl2581pO0mQ oTvqEEBkyCVWSq96FzbVJdlG7Xj5xsxfcOIY/BJerax7NOFheXwptcBsZDxmqyP/2+Aq41V8Lt0 PlmdqhoD9LFC75DEAbrxb6/aRm2lTgE63HtWJzrFUx2c2ujin7AZG2eK/Kz/780+k4LrGZXJ1ny Axv9pfU41eINSAflWKqkTd/yrFtBjYugToCrpPZ/7n8RfsC1p/yKDdkQzD6lLlmX5igGOPbbx/K PqjYjJECQ6zbAMMbxjytBSensVx0GW8GWljlOo+MtR1jWqcrY6EqYgPIrhRpJkvEVRtRwdSxVg4 8Cz27gQQXydeyIRiaxceT+iDQqlRQkkRNFNb/89hpDkZE6gzCWFGWufbAvDDmsNmYo6iOPwm+mv 9UC5V6UoW9JZYMd5uHawwOzwtQ53+McdSh9XDxIT5UfWMAEjB5AVfMrwL8QyDFAcR7R1A67cWHg Vt08Tpq9AQgP3BKgHIf/SF6Xprq X-Received: by 2002:a5d:5d0c:0:b0:47e:aa3f:2c48 with SMTP id ffacd0b85a97d-47f2dcee22amr5636508f8f.51.1783851656563; Sun, 12 Jul 2026 03:20:56 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c5:7815:1301:f27:e3a8:2334:314d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039ad21sm75005672f8f.20.2026.07.12.03.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 03:20:55 -0700 (PDT) From: Andrew Murray Date: Sun, 12 Jul 2026 11:20:36 +0100 Subject: [PATCH v3 5/6] printk: nbcon: move printk_delay to console emiting code Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260712-printkcleanup-v3-5-574547b8f71b@thegoodpenguin.co.uk> References: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> In-Reply-To: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> To: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Andrew Morton , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Clark Williams Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, Andrew Murray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783851647; l=7650; i=amurray@thegoodpenguin.co.uk; s=20250914; h=from:subject:message-id; bh=xTPk7bMacGsIS4hNT11NNaci9eKHhXtcV+ZSTG0lKOA=; b=olCuUnSskP8UUcCkrJl0aZbQZPg6LbVsW50TcUx2lh6wX1N1jyRaLr9/xYisz5o4FFw3PNpfW Hk7uUNFriYoBwgXf+cRf1/nZo/sd0cjr4P9/6D1KCA4Rdx2Uyc4hZnB X-Developer-Key: i=amurray@thegoodpenguin.co.uk; a=ed25519; pk=0SU0Q8S/uEiCdbXbXS+PvJGUCaBG1nDszD+HPU3Js0Q= The printk_delay and boot_delay features are helpful for debugging as kernel output can be slowed down during boot allowing messages to be seen before scrolling off the screen, or to correlate timing between some physical event and console output. However, since the introduction of nbcon and the legacy printer thread for PREEMPT_RT kernels, printk records are now emited to the console asynchronously to the caller of printk. Thus, any printk delay added by boot_delay/printk_delay continues to slow down the calling process but may not have any impact to the rate in which records are emited to the console. Let's address this by moving the printk delay from the calling code to the console emiting code instead. Whilst this ensures that delays are still observed (especially for slower consoles), it doesn't improve the use-case of using boot_delay/printk_delay to correlate timings between physical events and console output. Behavior change: Please note that printk delays now occur after messages are emitted rather than before. Please also note that the printk delays occur within the printk_safe (irqs off) context. Signed-off-by: Andrew Murray --- include/linux/console.h | 5 ++++- include/linux/printk.h | 1 - kernel/printk/internal.h | 6 ++++++ kernel/printk/nbcon.c | 13 +++++++++++++ kernel/printk/printk.c | 17 +++++++++-------- 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/include/linux/console.h b/include/linux/console.h index d624200cfc1708bf73925892a466efe0c95c5586..0f7a69bd1a42af38208fdb28971= 114f76f99a968 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -266,6 +266,8 @@ struct printk_buffers; * might cause a system freeze when the console * is used later. * @backlog: Ringbuffer has pending records + * @emitted: The context attempted to emit the message. Might + * be incomplete. * @pbufs: Pointer to the text buffer for this context * @seq: The sequence number to print for this context */ @@ -278,6 +280,7 @@ struct nbcon_context { =20 /* members set by emit */ unsigned int backlog : 1; + unsigned char emitted : 1; =20 /* members set by acquire */ struct printk_buffers *pbufs; @@ -298,7 +301,7 @@ struct nbcon_write_context { struct nbcon_context __private ctxt; char *outbuf; unsigned int len; - bool unsafe_takeover; + unsigned char unsafe_takeover : 1; #ifdef CONFIG_PRINTK_EXECUTION_CTX int cpu; pid_t pid; diff --git a/include/linux/printk.h b/include/linux/printk.h index ea52dc72b73b64898f82a0319b01c27323b18dee..8885e11367d50ea1cd764224985= 2d011e589adb4 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -188,7 +188,6 @@ extern int __printk_ratelimit(const char *func); extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, unsigned int interval_msec); =20 -extern unsigned int printk_delay_msec; extern int dmesg_restrict; =20 extern void wake_up_klogd(void); diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index 85fbf1801cbe070ad96d253bccdf775a11bf945a..c3586f8b8360208902bbbd46074= 13997bcbd5fb9 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -33,6 +33,8 @@ int devkmsg_sysctl_set_loglvl(const struct ctl_table *tab= le, int write, # define force_legacy_kthread() (false) #endif =20 +extern unsigned int printk_delay_msec; + #ifdef CONFIG_PRINTK =20 #ifdef CONFIG_PRINTK_CALLER @@ -131,6 +133,8 @@ static inline void nbcon_kthread_wake(struct console *c= on) rcuwait_wake_up(&con->rcuwait); /* LMM(nbcon_kthread_wake:A) */ } =20 +void printk_delay(bool use_atomic); + #else =20 #define PRINTK_PREFIX_MAX 0 @@ -162,6 +166,8 @@ static inline bool nbcon_legacy_emit_next_record(struct= console *con, bool *hand static inline void nbcon_kthread_wake(struct console *con) { } static inline void nbcon_kthreads_wake(void) { } =20 +static inline void printk_delay(bool use_atomic) { } + #endif /* CONFIG_PRINTK */ =20 extern bool have_boot_console; diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c index 4b03b019cd5ee25d68e9ace84392045e91241a7f..c8427906b1c54fb00d005ef87f7= 280e89fae2579 100644 --- a/kernel/printk/nbcon.c +++ b/kernel/printk/nbcon.c @@ -1069,6 +1069,8 @@ static bool nbcon_emit_next_record(struct nbcon_write= _context *wctxt, bool use_a else con->write_thread(con, wctxt); =20 + ctxt->emitted =3D 1; + if (!wctxt->outbuf) { /* * Ownership was lost and reacquired by the driver. Handle it @@ -1267,11 +1269,16 @@ static int nbcon_kthread_func(void *__console) =20 con_flags =3D console_srcu_read_flags(con); =20 + ctxt->emitted =3D 0; + if (console_is_usable(con, con_flags, false)) backlog =3D nbcon_emit_one(&wctxt, false); =20 console_srcu_read_unlock(cookie); =20 + if (backlog && ctxt->emitted) + printk_delay(false); + cond_resched(); =20 } while (backlog); @@ -1525,6 +1532,8 @@ bool nbcon_legacy_emit_next_record(struct console *co= n, bool *handover, } =20 progress =3D nbcon_emit_one(&wctxt, use_atomic); + if (progress && ctxt->emitted) + printk_delay(use_atomic); =20 if (use_atomic) { start_critical_timings(); @@ -1584,6 +1593,8 @@ static int __nbcon_atomic_flush_pending_con(struct co= nsole *con, u64 stop_seq) if (!nbcon_context_try_acquire(ctxt, false)) return -EPERM; =20 + ctxt->emitted =3D 0; + /* * nbcon_emit_next_record() returns false when * the console was handed over or taken over. @@ -1600,6 +1611,8 @@ static int __nbcon_atomic_flush_pending_con(struct co= nsole *con, u64 stop_seq) if (nbcon_seq_read(con) < stop_seq) err =3D -ENOENT; break; + } else if (ctxt->emitted) { + printk_delay(true); } } =20 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 4517266e9ca112e0dcb0163a99dd0e8d50931848..5df09e56cf8abc2d0555b6950ee= d4e483ba56d4b 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2143,18 +2143,17 @@ static inline void late_boot_delay_msec(void) } } =20 -static inline void printk_delay(int level) +void printk_delay(bool use_atomic) { - bool suppress =3D !is_printk_force_console() && - suppress_message_printing(level); - - if (likely(!printk_delay_msec) || suppress) + if (likely(!printk_delay_msec)) return; =20 if (system_state < SYSTEM_RUNNING) early_boot_delay_msec(); - else + else if (use_atomic) late_boot_delay_msec(); + else + msleep(printk_delay_msec); } =20 #define CALLER_ID_MASK 0x80000000 @@ -2474,8 +2473,6 @@ asmlinkage int vprintk_emit(int facility, int level, ft.legacy_direct =3D false; } =20 - printk_delay(level); - printed_len =3D vprintk_store(facility, level, dev_info, fmt, args); =20 if (ft.nbcon_atomic) @@ -3185,6 +3182,8 @@ static bool console_emit_next_record(struct console *= con, bool *handover, int co */ =20 con->write(con, outbuf, pmsg.outbuf_len); + printk_delay(true); + con->seq =3D pmsg.seq + 1; } else { /* @@ -3206,6 +3205,7 @@ static bool console_emit_next_record(struct console *= con, bool *handover, int co printk_legacy_allow_spinlock_enter(); con->write(con, outbuf, pmsg.outbuf_len); printk_legacy_allow_spinlock_exit(); + printk_delay(true); =20 start_critical_timings(); =20 @@ -3214,6 +3214,7 @@ static bool console_emit_next_record(struct console *= con, bool *handover, int co *handover =3D console_lock_spinning_disable_and_check(cookie); printk_safe_exit_irqrestore(flags); } + skip: return true; } --=20 2.34.1 From nobody Sat Jul 25 23:06:36 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 631C73A2559 for ; Sun, 12 Jul 2026 10:20:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851661; cv=none; b=NMx/nGBwzh+yGUo2VQoLxBwCzuRhqCLX888JxvDka4+AXKx4yjFLfS9H+9R0en2PCFxHUWMxT6aL14eY31qLwJ5pfaUjOm6IOC9C8w2ublnXVXQLkyyB5OCgcKE3Vud/SvDOxsBjWrBxd3XgEIH3iQx7XUdHR7Gdo15eDS8qCJU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783851661; c=relaxed/simple; bh=utDuo2WNw3hePhQreU1zjsPiOgUN3XHnEKmrepDTN04=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B+AAKR6sXgvzVhQXCR7B8hguPrdB9nCsoJk6LsfRk7kHv5dxDcvgwfX2jxSBCXPaWGeA/ah5RE+Q5qaGiaQOWSU5LVTa41B3a3lL1JD+fav6FKYjRHh/GU0shQEcULMF/uvdFFV7QA0eZZKin3XoS/yuDyFI1lkGbTH6fLlfqlQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk; spf=pass smtp.mailfrom=thegoodpenguin.co.uk; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b=kB89kTW4; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thegoodpenguin.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thegoodpenguin-co-uk.20251104.gappssmtp.com header.i=@thegoodpenguin-co-uk.20251104.gappssmtp.com header.b="kB89kTW4" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-47defd0c1c5so1454907f8f.3 for ; Sun, 12 Jul 2026 03:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thegoodpenguin-co-uk.20251104.gappssmtp.com; s=20251104; t=1783851658; x=1784456458; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=A7KLFAdTdSyp3t1Mmt+Mvc6gEqh9A7/9JU0e4I8/G4k=; b=kB89kTW4oQsUJXdUWg9Z9827qR3MwH43ZF0FvlD1fjZzB9vgVfVDDMQiqyp2oDjU9D xdgU9qIKFD/ZDxk5xfgVponJYDO/5M5EaM969MF30ZcBJDBeb0jAoH4iyrno2Yg2fis0 93wakmUNpXlUxGVgJesjqF9Fc9XNv87rbCI+YV/AQ+n7uECsurmdHEgmB7sDL0g0//cW VuiLgX6dCamLwjXZPtxMn86284Wn6nCLzPFzNUKHQ0kh4UJGydyYqxl8moW1ALTbboUg YPvuB7XP051qvXKuHSlUdtim9ymUIdL8dZ82HGblu9el5UpKal4k6b4qoEKlNQg4P3vO rSzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783851658; x=1784456458; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=A7KLFAdTdSyp3t1Mmt+Mvc6gEqh9A7/9JU0e4I8/G4k=; b=ga7tt2xWfjqMTiOkpk5t+dYl9ATrH7R9NU7yIpS49kJscAJgWTP6wwqZt0ZKA2hfRN en269cN3qyQzoOL/ablTBOO9uxPSIO/StYHmEjsIKiYiwAsMuqK0EZCidT6HnemEp+0j Y4HjfFC2v3l3T5+PfdUSYCsJswXCTR7T3IrDUjxU8st+kcSD/Lgku23l6PhJCIDX2kOi QuEVI8CYOCLal8rlPLDz8roRgVp7PjHJ/A5VHbFcZafhmJfxZOXEsy8O2En/QZZ+zr1t dDxBfjopeFgivd7LNnb5Vl/Jl7YFweiQGMUpIaoyps/dkb0hHufk9ZojZJo2mjBj8RJm 5++Q== X-Gm-Message-State: AOJu0Yzm14ue6kDxn2DqAjjLLLG/EHPYZzW2mUXqR747NzPWf3ZcfzzQ Gjr3cTE7wojOMyOVNv2wKXCChhIFjgpZE9WWbdF8lUMiqGqlPzGrGOL1cgcOBW6DQDU= X-Gm-Gg: AfdE7ck2qyuvW3M5dRbeR/7BiAbcPyphjDKYqt5vpOIhOuHRIgehD7R03Y+l9lrb+Qa u3AGIoYxJ6l2blpG0a9v98pIkUzhdMSDuA6xDZXUoUS3aAtoF8LBF/RiMOS5LGhShddXmKepHxp FZmpExIw1cRuHc3LzJtevNIU1ouehQad4fGrhPucdvJr8QUvdK1ck+n4cE1I6PXXdTqheJ+jUPO 6MZ8XNJUj8H0rNsRZU0Q6gdqmGWeYb8zr9u3QWmF/MZGdI5tAfRNSRYWWVt/fZ4svJlY05onkIp d1W/KrTkmA+KN3o553oHmV7ypLHf7cr7U+8Vc2vvRIl74bMsq33vRjxTGBLSH45F/UYDV3nJ7n1 8PLf8JCxhhJZkoQQVQsRQfSmRhJrxlN0lC/5ITihvTgBqh8qgAP+XP37p1zM7JvohJJMxebW0sd lfgjRrmjex6ib270F72kE9yxBPVx+bk6NT+RK8Togkl2bWBQ3xfm7m3/lBCZMnPxX/PlTSdrapc sMctiCD8VxbGejyqRy/JhhdP1N/38GtxiOHokU= X-Received: by 2002:a05:6000:2011:b0:470:2fb1:3dca with SMTP id ffacd0b85a97d-47f2dcd7487mr5749573f8f.30.1783851657812; Sun, 12 Jul 2026 03:20:57 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c5:7815:1301:f27:e3a8:2334:314d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039ad21sm75005672f8f.20.2026.07.12.03.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 03:20:57 -0700 (PDT) From: Andrew Murray Date: Sun, 12 Jul 2026 11:20:37 +0100 Subject: [PATCH v3 6/6] Documentation/kernel-parameters: add/update printk_delay/boot_delay Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260712-printkcleanup-v3-6-574547b8f71b@thegoodpenguin.co.uk> References: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> In-Reply-To: <20260712-printkcleanup-v3-0-574547b8f71b@thegoodpenguin.co.uk> To: Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Andrew Morton , Greg Kroah-Hartman , Sebastian Andrzej Siewior , Clark Williams Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, Andrew Murray X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783851647; l=2383; i=amurray@thegoodpenguin.co.uk; s=20250914; h=from:subject:message-id; bh=utDuo2WNw3hePhQreU1zjsPiOgUN3XHnEKmrepDTN04=; b=d2X0BHuJ1CQWytJ0SAMIIKCGulICkuSxHkoRz5VTU3oDIwlYsespo8YnKmxdQHRuNbprslaM8 uR4zOBiuOBHAxYnf8z9WGG4RYEgwLfDBxKehgKZ57nyiym/LudtIjxS X-Developer-Key: i=amurray@thegoodpenguin.co.uk; a=ed25519; pk=0SU0Q8S/uEiCdbXbXS+PvJGUCaBG1nDszD+HPU3Js0Q= boot_delay has been deprecated in favour of an extended printk_delay, let's update kernel-parameters to reflect the addition of printk_delay and the deprecation of boot_delay. Reviewed-by: Petr Mladek Signed-off-by: Andrew Murray --- Documentation/admin-guide/kernel-parameters.txt | 31 +++++++++++++++++++++= ---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 2884103b93bca7b76cd3a93946276074cf62d0a1..1118feda87b1b04543b1da0bd52= c090b1fddaeac 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -650,11 +650,19 @@ Kernel parameters See Documentation/block/cmdline-partition.rst =20 boot_delay=3D [KNL,EARLY] - Milliseconds to delay each printk during boot. - Only works if GENERIC_CALIBRATE_DELAY is enabled, - and you may also have to specify "lpj=3D". Boot_delay - values larger than 10 seconds (10000) are assumed - erroneous and ignored. + Milliseconds to delay each printk during and post boot. + Boot time delays only work if GENERIC_CALIBRATE_DELAY + is enabled. + + Once booted the delay can be removed or adjusted via + the printk_delay sysctl. + + Please note that you may also have to specify "lpj=3D". + Boot_delay values larger than 10 seconds (10000) are + assumed erroneous and ignored. + + This will soon be deprecated, please use printk_delay + instead. Format: integer =20 bootconfig [KNL,EARLY] @@ -5468,6 +5476,19 @@ Kernel parameters printk.time=3D Show timing data prefixed to each printk message line Format: (1/Y/y=3Denable, 0/N/n=3Ddisable) =20 + printk_delay=3D [KNL,EARLY] + Milliseconds to delay each printk during and post boot. + Boot time delays only work if GENERIC_CALIBRATE_DELAY + is enabled. + + Once booted the delay can be removed or adjusted via + the printk_delay sysctl. + + Please note that you may also have to specify "lpj=3D". + printk_delay values larger than 10 seconds (10000) are + assumed erroneous and ignored. + Format: integer + proc_mem.force_override=3D [KNL] Format: {always | ptrace | never} Traditionally /proc/pid/mem allows memory permissions to be --=20 2.34.1