diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-11-24 05:48:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-24 06:10:51 -0500 |
commit | b24c2a925a9837cccf54d50aeac22ba0cbc15455 (patch) | |
tree | 41da574f9dd4c39c290fd0480cb615d808b84cb5 /arch/x86/kernel/setup.c | |
parent | eb41c8be89dbe079f49202774e04a79ccac48a09 (diff) |
x86: Move find_smp_config() earlier and avoid bootmem usage
Move the find_smp_config() call to before bootmem is initialized.
Use reserve_early() instead of reserve_bootmem() in it.
This simplifies the code, we only need to call find_smp_config()
once and can remove the now unneeded reserve parameter from
x86_init_mpparse::find_smp_config.
We thus also reduce x86's dependency on bootmem allocations.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B0BB9F2.70907@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index e3eae5965e4a..cdb6a8a506dd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -913,6 +913,11 @@ void __init setup_arch(char **cmdline_p) | |||
913 | 913 | ||
914 | early_acpi_boot_init(); | 914 | early_acpi_boot_init(); |
915 | 915 | ||
916 | /* | ||
917 | * Find and reserve possible boot-time SMP configuration: | ||
918 | */ | ||
919 | find_smp_config(); | ||
920 | |||
916 | #ifdef CONFIG_ACPI_NUMA | 921 | #ifdef CONFIG_ACPI_NUMA |
917 | /* | 922 | /* |
918 | * Parse SRAT to discover nodes. | 923 | * Parse SRAT to discover nodes. |
@@ -927,11 +932,6 @@ void __init setup_arch(char **cmdline_p) | |||
927 | 932 | ||
928 | initmem_init(0, max_pfn, acpi, k8); | 933 | initmem_init(0, max_pfn, acpi, k8); |
929 | 934 | ||
930 | /* | ||
931 | * Find and reserve possible boot-time SMP configuration: | ||
932 | */ | ||
933 | find_smp_config(); | ||
934 | |||
935 | #ifdef CONFIG_X86_64 | 935 | #ifdef CONFIG_X86_64 |
936 | /* | 936 | /* |
937 | * dma32_reserve_bootmem() allocates bootmem which may conflict | 937 | * dma32_reserve_bootmem() allocates bootmem which may conflict |