From nobody Tue Feb 10 10:59:30 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 248E126B755 for ; Sat, 27 Dec 2025 12:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766837857; cv=none; b=pkl3g5xvsD4lyKzKihviOsFYxqcaYHXlFqpQ83FGsw1O7thIVdvsaafg2EM2/fm2lCUHR1PcbaU43557LxROEH/G10hZi+qmotQSLfi57w1ZFnnYDojtln5uvnLDA84THirW+gH5bw7XRr4+OQ9U+Yoz3Ky5b0tiFsUwefKTWhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766837857; c=relaxed/simple; bh=ZR0iR9pvZGcVZSHwNZDrCThadrViJMyV5/bfGtiN4gw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VaBo/wlpKRI8SfYccRWqmtt2mCdRaVavpBf2pxCdte9fODKMz8HKnJRVkb2S2Qg1M+lCac8Nv84krlQldOCQBo8qRFZXgm1hCsa4el+6vsWoVtgipYxGNGmZ422YrLpIGw35w9DbKoIXa+fjUD0y5dIa8XbDsn56AUzrc5wWXuk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=d0hkAh+A; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="d0hkAh+A" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso75769045e9.3 for ; Sat, 27 Dec 2025 04:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1766837853; x=1767442653; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GvSE1c/4a8QCKCTV5gdf1mCLxf9YZVQyxdWd8z10SmE=; b=d0hkAh+APo89SF/oO/BATGo4UBjKStTkO6nvr+Kw3SITajoXYaVQ15NLvunGq+CgKm /f1RU381IpYScuBObwBAeOa14t5nYX+bmB3LMkOmJEnOz9lpx7R8KZLwrDSSwWCYUYdF 5mRdpAypRmMTYXRAyQX5ZUAHYt96mgzso6yyFK9MX9+RzVeWtATQZGCi467A787ljwOo Rx6n68rbC7osZgiy2NJS2qABPEz+4BHDdQbaQsd6vbAE2gsJ117+6BSmAC5KkKBy70Kw e1a0tdAfHZNz9MAhwrpUMvRik9PS2l9RIU3aNlyFE4Nl4pCKIYgilb2C7b/ZBPc+Ym/+ hx4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766837853; x=1767442653; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=GvSE1c/4a8QCKCTV5gdf1mCLxf9YZVQyxdWd8z10SmE=; b=jr7dgpkreTd1WDiZavTxYGCGYMPCyZkRkp08nXNaT/Z5qoS2xaQaGXBwfcMW/7Gxhf JVmdOXrTHDibPA1ruAFCxfp5LsAD+5msmRJnw0wpvQt6UkhaKL/2A9cvSx8qDPYwLntO kJ2gNh98XNnVRnLKQSxa+Q9z/atONOtrEUfKtWtFwNj86lwiVWlrWHapbnpQdm+UbqTr iRGxdUd5XGMFsepL2YCtaPAxxf89S6nn01DZvuHKcBomVhPiBT+PRIkxFtxzbwx9fcPL jwB5KYfxxb0ybemq3fFcJgL5zcsutEK88RRzbj4NX/u8rKgJQg4VR1kv8DFdvd6I58/L H0pw== X-Forwarded-Encrypted: i=1; AJvYcCW68IEjv7WPXWTZWZL2iuz5zn5xRXMO5rMY+ARwpPh3VPYqZXqj+HOVOQGWsWwSvvEP2GruyPRKLbcuJHo=@vger.kernel.org X-Gm-Message-State: AOJu0YxjO7HgAsR4cxZTVUJLc5wy8woBroBS35EMShcoMvOapNB75nP8 cKS8RqjwLOtPDABOFZS3dqNxT9WtzrunV7tyT1HHvADmH6xx1HRDjzI5OKJ4BRT4nMw= X-Gm-Gg: AY/fxX5JKtYyQnudMjpfgfHIqNe99Ptg70qbbx2OA3E2zzqokRwv2hiMD/0sGGhGvpr m7sW67j2HkobRPH/6fKRCHUiLTCVrx0fMPt/f5LQWB7Tox2H6NiAIC+8IRrqVbqO1kcPxtSbMSe eTNafNYJ82qea6VMdDFmkl3bJVXsyj3qlumtLTop7wKi/lZYjKwkOfz3pl2Kj5I3FlitRb1dGvB qRnhdyjiR8N+ufnyHjdkhwBZpeGueWpnbC6/NPP4CDESpAaxtKiA/9CVIyN7vpg3SLkVp8v1wuV eMKlWqUdt6Vtg440ExRJ3jD7nmYDbotjM2yBUU+JKBLgs7DYaEoydm8qgkGUA07+UnucMaIl+sl KRHKUmD2PUqYiPDEQCimgPxlcQ7ZVDgKsxL2nSHJq0FNu6+Kl6KXilwyk59NvHNZjLUDVURn99H GUt2J/9Ga2qBTgXolu0mU= X-Google-Smtp-Source: AGHT+IFc0PxKRmRSwma+5BK2z0BfbuhbWCK5ZAQiNCh/fQVQ/f+EcwX2yper4KDcLK2LLWDZAwXkgQ== X-Received: by 2002:a05:600c:620c:b0:475:dde5:d91b with SMTP id 5b1f17b1804b1-47d3639489cmr187665015e9.17.1766837853435; Sat, 27 Dec 2025 04:17:33 -0800 (PST) Received: from [127.0.0.1] ([2804:5078:811:d400:58f2:fc97:371f:2]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfdd0sm97940127c88.4.2025.12.27.04.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Dec 2025 04:17:32 -0800 (PST) From: Marcos Paulo de Souza Date: Sat, 27 Dec 2025 09:16:12 -0300 Subject: [PATCH 05/19] printk: Add more context to suspend/resume functions 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: <20251227-printk-cleanup-part3-v1-5-21a291bcf197@suse.com> References: <20251227-printk-cleanup-part3-v1-0-21a291bcf197@suse.com> In-Reply-To: <20251227-printk-cleanup-part3-v1-0-21a291bcf197@suse.com> To: Richard Weinberger , Anton Ivanov , Johannes Berg , Greg Kroah-Hartman , Jason Wessel , Daniel Thompson , Douglas Anderson , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jiri Slaby , Breno Leitao , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Geert Uytterhoeven , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Andreas Larsson , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Jacky Huang , Shan-Chun Hung , Laurentiu Tudor Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org, netdev@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-hardening@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, Marcos Paulo de Souza X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1766837798; l=1815; i=mpdesouza@suse.com; s=20231031; h=from:subject:message-id; bh=ZR0iR9pvZGcVZSHwNZDrCThadrViJMyV5/bfGtiN4gw=; b=tA7/rFTFgz8i0hdAJ53eXVaQiZ32fF9Si88T8AKGgxMwsJDyXHg4gS+HXEQzjoX95zhxiaqSG v/P+ZTpJjf2DQdqlDkpPXA8mgBEajKQf1Xila0zWamPBwICGf70zjAA X-Developer-Key: i=mpdesouza@suse.com; a=ed25519; pk=/Ni/TsKkr69EOmdZXkp1Q/BlzDonbOBRsfPa18ySIwU= The new comments clarifies from where the functions are supposed to be called. Signed-off-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 173c14e08afe..85a8b6521d9e 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2734,7 +2734,8 @@ MODULE_PARM_DESC(console_no_auto_verbose, "Disable co= nsole loglevel raise to hig /** * console_suspend_all - suspend the console subsystem * - * This disables printk() while we go into suspend states + * This disables printk() while we go into suspend states. Called by the p= ower + * management subsystem. */ void console_suspend_all(void) { @@ -2766,6 +2767,12 @@ void console_suspend_all(void) synchronize_srcu(&console_srcu); } =20 +/** + * console_resume_all - resume the console subsystem + * + * This resumes printk() when the system is being restored. Called by the = power + * management subsystem. + */ void console_resume_all(void) { struct console_flush_type ft; @@ -3553,7 +3560,7 @@ struct tty_driver *console_device(int *index) /* * Prevent further output on the passed console device so that (for exampl= e) * serial drivers can suspend console output before suspending a port, and= can - * re-enable output afterwards. + * re-enable output afterwards. Called by console drivers. */ void console_suspend(struct console *console) { @@ -3572,6 +3579,7 @@ void console_suspend(struct console *console) } EXPORT_SYMBOL(console_suspend); =20 +/* Resumes printing on the passed console device. Called by console driver= s. */ void console_resume(struct console *console) { struct console_flush_type ft; --=20 2.52.0