提交 5f4765f9 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

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: NYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 cb95a13a
...@@ -810,10 +810,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -810,10 +810,6 @@ void __init setup_arch(char **cmdline_p)
*/ */
acpi_boot_init(); acpi_boot_init();
#ifdef CONFIG_X86_64
init_cpu_to_node();
#endif
#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS) #if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
/* /*
* get boot-time SMP configuration: * get boot-time SMP configuration:
...@@ -822,6 +818,10 @@ void __init setup_arch(char **cmdline_p) ...@@ -822,6 +818,10 @@ void __init setup_arch(char **cmdline_p)
get_smp_config(); get_smp_config();
#endif #endif
#ifdef CONFIG_X86_64
init_cpu_to_node();
#endif
init_apic_mappings(); init_apic_mappings();
ioapic_init_mappings(); ioapic_init_mappings();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册