All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, smpboot: Fix cores per node printing on boot
@ 2010-06-01 19:04 Borislav Petkov
  2010-06-02  7:43 ` [tip:x86/urgent] " tip-bot for Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2010-06-01 19:04 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner; +Cc: x86, LKML

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.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 37462f1..c4f33b2 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -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) {
-- 
1.6.4.4


-- 
Regards/Gruss,
Boris.

Operating Systems Research Center
Advanced Micro Devices, Inc.


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-02  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-01 19:04 [PATCH] x86, smpboot: Fix cores per node printing on boot Borislav Petkov
2010-06-02  7:43 ` [tip:x86/urgent] " tip-bot for Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.