aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-02 21:54:40 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:16:24 -0400
commit329513a35d1a2b6b28d54f5c2c0dde4face8200b (patch)
treeef517f954c7dc6e86952e372608bde091b13f803 /arch
parent5f4765f96eebee6a0adc4009758b597ba48a0a3a (diff)
x86: move prefill_possible_map calling early
call it right after we are done with MADT/mptable handling, instead of doing that in setup_per_cpu_areas() later on... this way for_possible_cpu() can be used early. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/setup.c1
-rw-r--r--arch/x86/kernel/setup_percpu.c10
-rw-r--r--arch/x86/kernel/smpboot.c8
3 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f52a6fb90238..cfcfbefee0b9 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -818,6 +818,7 @@ void __init setup_arch(char **cmdline_p)
818 get_smp_config(); 818 get_smp_config();
819#endif 819#endif
820 820
821 prefill_possible_map();
821#ifdef CONFIG_X86_64 822#ifdef CONFIG_X86_64
822 init_cpu_to_node(); 823 init_cpu_to_node();
823#endif 824#endif
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 43aca2de624a..5fc310f746fc 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -162,16 +162,6 @@ void __init setup_per_cpu_areas(void)
162 char *ptr; 162 char *ptr;
163 int cpu; 163 int cpu;
164 164
165 /* no processor from mptable or madt */
166 if (!num_processors)
167 num_processors = 1;
168
169#ifdef CONFIG_HOTPLUG_CPU
170 prefill_possible_map();
171#else
172 nr_cpu_ids = num_processors;
173#endif
174
175 /* Setup cpu_pda map */ 165 /* Setup cpu_pda map */
176 setup_cpu_pda_map(); 166 setup_cpu_pda_map();
177 167
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 3b19441d78b8..e1200b202ed7 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1278,12 +1278,20 @@ __init void prefill_possible_map(void)
1278 int i; 1278 int i;
1279 int possible; 1279 int possible;
1280 1280
1281 /* no processor from mptable or madt */
1282 if (!num_processors)
1283 num_processors = 1;
1284
1285#ifdef CONFIG_HOTPLUG_CPU
1281 if (additional_cpus == -1) { 1286 if (additional_cpus == -1) {
1282 if (disabled_cpus > 0) 1287 if (disabled_cpus > 0)
1283 additional_cpus = disabled_cpus; 1288 additional_cpus = disabled_cpus;
1284 else 1289 else
1285 additional_cpus = 0; 1290 additional_cpus = 0;
1286 } 1291 }
1292#else
1293 additional_cpus = 0;
1294#endif
1287 possible = num_processors + additional_cpus; 1295 possible = num_processors + additional_cpus;
1288 if (possible > NR_CPUS) 1296 if (possible > NR_CPUS)
1289 possible = NR_CPUS; 1297 possible = NR_CPUS;