public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sauerwein <dssauerw@amazon.de>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<nh-open-source@amazon.com>, David Sauerwein <dssauerw@amazon.de>,
	"Paul Menzel" <pmenzel@molgen.mpg.de>,
	John Ogness <john.ogness@linutronix.de>
Subject: [PATCH] x86: smpboot: Always log CPU numbers at info level
Date: Mon, 4 May 2026 16:16:39 +0000	[thread overview]
Message-ID: <20260504161639.52475-1-dssauerw@amazon.de> (raw)

announce_cpu uses pr_cont to log CPU numbers of a NUMA node on the same
log line across multiple calls of the function at info level. However,
if any other message is printed in between these calls, pr_cont is
unable to continue the previous message and logs a new line at
KERN_DEFAULT level. On systems where MESSAGE_LOGLEVEL_DEFAULT is left at
its default value, this causes these lines to show up at warn level.

[INFO][    0.051137] x86: Booting SMP configuration:
[INFO][    0.051139] .... node  #0, CPUs:        #1  #2  #3  #4  #5  #6  #7  #8  #9 #10 #11 #12 #13 #14 #15 #16 #17 #18 #19 #20 #21 #22 #23
[INFO][    0.056620] .... node  #1, CPUs:   #24
[INFO][    0.006767] smpboot: CPU 24 Converting physical 0 to logical die 1
[WARN][    0.056761]  #25 #26 #27 #28 #29 #30 #31 #32 #33 #34 #35 #36 #37 #38 #39 #40 #41 #42 #43 #44 #45 #46 #47
[INFO][    0.060721] .... node  #0, CPUs:   #48
[WARN][    0.060731] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[WARN][    0.060731] TAA CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html for more details.
[WARN][    0.060731] MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.
[WARN][    0.060731]  #49 #50 #51 #52 #53 #54 #55 #56 #57 #58 #59 #60 #61 #62 #63 #64 #65 #66 #67 #68 #69 #70 #71
[INFO][    0.068678] .... node  #1, CPUs:   #72 #73 #74 #75 #76 #77 #78 #79 #80 #81 #82 #83 #84 #85 #86 #87 #88 #89 #90 #91 #92 #93 #94 #95

(Example logs collected on a v5.10 based kernel)

Fix this by explicitly setting the log level to KERN_INFO when calling
pr_cont.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/all/e964b2ae-7a15-a510-e76a-56d704949d62@molgen.mpg.de/
Suggested-by: John Ogness <john.ogness@linutronix.de>
Link: https://lore.kernel.org/all/871rdg8dyb.fsf@jogness.linutronix.de/
Signed-off-by: David Sauerwein <dssauerw@amazon.de>
---
 arch/x86/kernel/smpboot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 294a8ea602986..4a5e2c0d6286d 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -949,7 +949,7 @@ static void announce_cpu(int cpu, int apicid)
 
 		if (node != current_node) {
 			if (current_node > (-1))
-				pr_cont("\n");
+				pr_cont(KERN_INFO "\n");
 			current_node = node;
 
 			printk(KERN_INFO ".... node %*s#%d, CPUs:  ",
@@ -958,10 +958,10 @@ static void announce_cpu(int cpu, int apicid)
 
 		/* Add padding for the BSP */
 		if (first)
-			pr_cont("%*s", width + 1, " ");
+			pr_cont(KERN_INFO "%*s", width + 1, " ");
 		first = 0;
 
-		pr_cont("%*s#%d", width - num_digits(cpu), " ", cpu);
+		pr_cont(KERN_INFO "%*s#%d", width - num_digits(cpu), " ", cpu);
 	} else
 		pr_info("Booting Node %d Processor %d APIC 0x%x\n",
 			node, cpu, apicid);
-- 
2.47.3




Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597


                 reply	other threads:[~2026-05-04 16:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260504161639.52475-1-dssauerw@amazon.de \
    --to=dssauerw@amazon.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nh-open-source@amazon.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox