diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-02 21:53:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:16:23 -0400 |
commit | 5f4765f96eebee6a0adc4009758b597ba48a0a3a (patch) | |
tree | b47b506e989a31e8a14536706b0ef3b14333be2e /arch/x86/kernel/setup.c | |
parent | cb95a13a8ace8612ecab042a838e5aab2ec14ef0 (diff) |
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 as
setup_per_cpu_data is already called before that so we will get
per_cpu_data on the wrong node.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d5de157b02a..f52a6fb9023 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -810,10 +810,6 @@ void __init setup_arch(char **cmdline_p) | |||
810 | */ | 810 | */ |
811 | acpi_boot_init(); | 811 | acpi_boot_init(); |
812 | 812 | ||
813 | #ifdef CONFIG_X86_64 | ||
814 | init_cpu_to_node(); | ||
815 | #endif | ||
816 | |||
817 | #if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS) | 813 | #if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS) |
818 | /* | 814 | /* |
819 | * get boot-time SMP configuration: | 815 | * get boot-time SMP configuration: |
@@ -822,6 +818,10 @@ void __init setup_arch(char **cmdline_p) | |||
822 | get_smp_config(); | 818 | get_smp_config(); |
823 | #endif | 819 | #endif |
824 | 820 | ||
821 | #ifdef CONFIG_X86_64 | ||
822 | init_cpu_to_node(); | ||
823 | #endif | ||
824 | |||
825 | init_apic_mappings(); | 825 | init_apic_mappings(); |
826 | ioapic_init_mappings(); | 826 | ioapic_init_mappings(); |
827 | 827 | ||