Skip to contentSkip to conversation

x86, smpboot: Fix cores per node printing on boot

PATCH In review Borislav Petkov 1 participant 2 messages Jun 1, 2010 – Jun 2, 2010 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, smpboot: Fix cores per node printing on boot

Percpu initialization happens now after booting the cores on the machine and this causes them all to be displayed as belonging to node 0:

Jun  8 05:57:21 kepek kernel: [    0.106999] Booting Node   0, Processors  #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16 #17 #18 #19 #20 #21 #22 #23 Ok.

Use early_cpu_to_node() to get the correct node of each core instead.

---
 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/smpboot.c +1 -1
index 37462f1..c4f33b2 100644
@@ -686,7 +686,7 @@ static void __cpuinit do_fork_idle(struct work_struct *work)
 static void __cpuinit announce_cpu(int cpu, int apicid)
 {
 	static int current_node = -1;
-	int node = cpu_to_node(cpu);
+	int node = early_cpu_to_node(cpu);
 
 	if (system_state == SYSTEM_BOOTING) {
 		if (node != current_node) {
Signature · 9 lines
1.6.4.4


-- 
Regards/Gruss,
Boris.

Operating Systems Research Center
Advanced Micro Devices, Inc.
#1 lore raw
Commit-ID:  4adc8b71cc142f9a7b44b13b99aab38ba897c56f
Gitweb:     http://git.kernel.org/tip/4adc8b71cc142f9a7b44b13b99aab38ba897c56f
Author:     Borislav Petkov <[email protected]>
AuthorDate: Tue, 1 Jun 2010 21:04:55 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 2 Jun 2010 09:38:53 +0200

x86, smpboot: Fix cores per node printing on boot

Percpu initialization happens now after booting the cores on the machine and this causes them all to be displayed as belonging to node 0:

Jun  8 05:57:21 kepek kernel: [    0.106999] Booting Node   0,

Processors #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16 #17 #18 #19 #20 #21 #22 #23 Ok.

Use early_cpu_to_node() to get the correct node of each core instead.

LKML-Reference: <20100601190455.GA14237@aftab>

---
 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/smpboot.c +1 -1
index 37462f1..c4f33b2 100644
@@ -686,7 +686,7 @@ static void __cpuinit do_fork_idle(struct work_struct *work)
 static void __cpuinit announce_cpu(int cpu, int apicid)
 {
 	static int current_node = -1;
-	int node = cpu_to_node(cpu);
+	int node = early_cpu_to_node(cpu);
 
 	if (system_state == SYSTEM_BOOTING) {
 		if (node != current_node) {