Skip to content

Commit

Permalink
x86: move init_cpu_to_node after get_smp_config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent cb95a13 commit 5f4765f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,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:
Expand All @@ -822,6 +818,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();

Expand Down

0 comments on commit 5f4765f

Please sign in to comment.