mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Ingo Molnar <mingo@kernel.org>
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org,
	huawei.libin@huawei.com, wangyijing@huawei.com,
	fenghua.yu@intel.com, tglx@linutronix.de, guohanjun@huawei.com,
	paul.gortmaker@windriver.com, linux-tip-commits@vger.kernel.org
Subject: [PATCH -v1.1] x86, boot: Further compress CPUs bootup message
Date: Sat, 28 Sep 2013 20:04:59 +0200	[thread overview]
Message-ID: <20130928180459.GF5956@pd.tnic> (raw)
In-Reply-To: <20130928175444.GA4402@gmail.com>

From: Borislav Petkov <bp@suse.de>

Turn it into:

[    0.066391] x86: Booting SMP configuration:
[    0.067008] .... node #  0, CPUs:        #1  #2  #3  #4  #5  #6  #7
[    0.595005] .... node #  1, CPUs:    #8  #9 #10 #11 #12 #13 #14 #15
[    1.193005] .... node #  2, CPUs:   #16 #17 #18 #19 #20 #21 #22 #23
[    1.789010] .... node #  3, CPUs:   #24 #25 #26 #27 #28 #29 #30 #31
[    2.395005] .... node #  4, CPUs:   #32 #33 #34 #35 #36 #37 #38 #39
[    2.996005] .... node #  5, CPUs:   #40 #41 #42 #43 #44 #45 #46 #47
[    3.594005] .... node #  6, CPUs:   #48 #49 #50 #51 #52 #53 #54 #55
[    4.209005] .... node #  7, CPUs:   #56 #57 #58 #59 #60 #61 #62 #63
[    4.819594] x86: Booted up 8 nodes, 64 CPUs

and

[    0.065309] x86: Booting SMP configuration:
[    0.066007] .... node #  0, CPUs:      #1 #2 #3 #4 #5 #6 #7
[    0.590281] x86: Booted up 1 node, 8 CPUs

and drop useless elements.

Signed-off-by: Borislav Petkov <bp@suse.de>
---

 -v1.1: Drop suspicious (long) cast.


 arch/x86/kernel/smpboot.c | 17 +++++++++++++----
 kernel/smp.c              |  7 ++++++-
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index d41f3ba26ced..5333b4c7e93c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -647,6 +647,14 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
 	return (send_status | accept_status);
 }
 
+void smp_announce(void)
+{
+	int num_nodes = num_online_nodes();
+
+	printk(KERN_INFO "x86: Booted up %d node%s, %d CPUs\n",
+	       num_nodes, (num_nodes > 1 ? "s" : ""), num_online_cpus());
+}
+
 /* reduce the number of lines printed when booting a large cpu count system */
 static void announce_cpu(int cpu, int apicid)
 {
@@ -657,12 +665,15 @@ static void announce_cpu(int cpu, int apicid)
 	if (!width)
 		width = num_digits(num_possible_cpus()) + 1; /* + '#' sign */
 
+	if (cpu == 1)
+		printk(KERN_INFO "x86: Booting SMP configuration:\n");
+
 	if (system_state == SYSTEM_BOOTING) {
 		if (node != current_node) {
 			if (current_node > (-1))
-				pr_cont(" OK\n");
+				pr_cont("\n");
 			current_node = node;
-			pr_info("Booting Node %3d, Processors:", node);
+			printk(KERN_INFO ".... node #%3d, CPUs:  ", node);
 		}
 
 		/* Add padding for the BSP */
@@ -671,8 +682,6 @@ static void announce_cpu(int cpu, int apicid)
 
 		pr_cont("%*s#%d", width - num_digits(cpu), " ", cpu);
 
-		if (cpu == num_present_cpus() - 1)
-			pr_cont(" OK\n");
 	} else
 		pr_info("Booting Node %d Processor %d APIC 0x%x\n",
 			node, cpu, apicid);
diff --git a/kernel/smp.c b/kernel/smp.c
index 0564571dcdf7..f5768b0c816a 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -524,6 +524,11 @@ void __init setup_nr_cpu_ids(void)
 	nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
 }
 
+void __weak smp_announce(void)
+{
+	printk(KERN_INFO "Brought up %d CPUs\n", num_online_cpus());
+}
+
 /* Called by boot processor to activate the rest. */
 void __init smp_init(void)
 {
@@ -540,7 +545,7 @@ void __init smp_init(void)
 	}
 
 	/* Any cleanup work */
-	printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus());
+	smp_announce();
 	smp_cpus_done(setup_max_cpus);
 }
 
-- 
1.8.4

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  reply	other threads:[~2013-09-28 18:05 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 10:57 [PATCH] x86, smpboot: fix announce_cpu() to print the last OK Libin
2013-09-05 17:52 ` [tip:x86/urgent] x86/smpboot: Fix announce_cpu() to printk() the last "OK" properly tip-bot for Libin
2013-09-25 10:07   ` Borislav Petkov
2013-09-25 18:29     ` Ingo Molnar
2013-09-26 23:15       ` Borislav Petkov
2013-09-27  6:51         ` Ingo Molnar
2013-09-27 10:38           ` Borislav Petkov
2013-09-27 14:32             ` Borislav Petkov
2013-09-27 14:34               ` [PATCH 1/2] x86, alternatives: Drop ancient lockdep fixup message Borislav Petkov
2013-09-28  8:28                 ` [tip:core/locking] lockdep, x86/alternatives: " tip-bot for Borislav Petkov
2013-09-27 14:35               ` [PATCH 2/2] x86: Cleanup boot CPUs table Borislav Petkov
2013-09-28  8:25                 ` Ingo Molnar
2013-09-28 10:23                   ` Borislav Petkov
2013-09-28 13:44                     ` Ingo Molnar
2013-09-28 17:47                       ` [PATCH] x86, boot: Further compress CPUs bootup message Borislav Petkov
2013-09-28 17:54                         ` Ingo Molnar
2013-09-28 18:04                           ` Borislav Petkov [this message]
2013-09-28 18:12                             ` [PATCH -v1.1] " Ingo Molnar
2013-09-28 19:15                               ` Borislav Petkov
2013-09-28 19:25                                 ` Ingo Molnar
2013-09-28 19:36                                   ` [PATCH -v1.3] " Borislav Petkov
2013-09-28 19:42                                   ` [PATCH -v1.1] " H. Peter Anvin
2013-09-28 19:49                                     ` Borislav Petkov
2013-09-28 19:54                                       ` Borislav Petkov
2013-09-28 19:58                                         ` Ingo Molnar
2013-09-28 20:08                                           ` Borislav Petkov
2013-09-28 23:13                                             ` H. Peter Anvin
2013-09-29  9:14                                               ` Borislav Petkov
2013-09-29 15:17                                                 ` [PATCH -v1.4] " Borislav Petkov
2013-09-29 15:44                                                 ` [PATCH -v1.1] " H. Peter Anvin
2013-09-30  6:28                                                   ` Ingo Molnar
2013-09-30  9:56                                                     ` Borislav Petkov
2013-10-01  8:53                                                       ` Ingo Molnar
2013-10-01  9:10                                                       ` [tip:x86/boot] x86/boot: " tip-bot for Borislav Petkov
2013-10-02 11:52                                                         ` Peter Zijlstra
2013-10-02 12:18                                                           ` Ingo Molnar
2013-10-02 12:20                                                           ` Peter Zijlstra
2013-10-02 13:55                                                             ` Borislav Petkov
2013-09-28 19:58                                     ` [PATCH -v1.1] x86, boot: " Ingo Molnar
2013-09-28 20:10                                       ` Borislav Petkov
2013-09-29  5:10                                         ` H. Peter Anvin
2013-09-29  2:55                   ` [PATCH 2/2] x86: Cleanup boot CPUs table Mike Galbraith
2013-09-28  8:28                 ` [tip:x86/boot] x86: Improve the printout of the SMP bootup CPU table tip-bot for Borislav Petkov
2013-09-29  4:25                   ` Yinghai Lu
2013-09-27 12:48           ` [tip:x86/urgent] x86/smpboot: Fix announce_cpu() to printk() the last "OK" properly Borislav Petkov
2013-09-27 13:33             ` Ingo Molnar

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=20130928180459.GF5956@pd.tnic \
    --to=bp@alien8.de \
    --cc=fenghua.yu@intel.com \
    --cc=guohanjun@huawei.com \
    --cc=hpa@zytor.com \
    --cc=huawei.libin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=tglx@linutronix.de \
    --cc=wangyijing@huawei.com \
    /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

Powered by JetHome