* [PATCH] x86: smpboot: Always log CPU numbers at info level
@ 2026-05-04 16:16 David Sauerwein
0 siblings, 0 replies; only message in thread
From: David Sauerwein @ 2026-05-04 16:16 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
Cc: x86, linux-kernel, nh-open-source, David Sauerwein, Paul Menzel,
John Ogness
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-04 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 16:16 [PATCH] x86: smpboot: Always log CPU numbers at info level David Sauerwein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox