[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807021853.44492.yhlu.kernel@gmail.com>
Date: Wed, 2 Jul 2008 18:53:44 -0700
From: Yinghai Lu <yhlu.kernel@...il.com>
To: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: move init_cpu_to_node after get_smp_config
when acpi=off, cpu_to_apicid is ready after get_smp_config
so need to move init_cpu_to_node after it.
otherwise, we will get wrong cpu->node mapping. and it will rely on
amd_detect_cmp to correct it. but that is too late.
setup_per_cpu_data is already called before that.
we will get per_cpu_data on wrong node.
Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com>
---
arch/x86/kernel/setup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -780,10 +780,6 @@ void __init setup_arch(char **cmdline_p)
*/
acpi_boot_init();
-#ifdef CONFIG_X86_64
- init_cpu_to_node();
-#endif
-
#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
/*
* get boot-time SMP configuration:
@@ -792,6 +788,10 @@ void __init setup_arch(char **cmdline_p)
get_smp_config();
#endif
+#ifdef CONFIG_X86_64
+ init_cpu_to_node();
+#endif
+
init_apic_mappings();
ioapic_init_mappings();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists