aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--include/asm-x86/smp.h4
4 files changed, 13 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;
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index fad45f6a193f..b324a0645a78 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -119,6 +119,10 @@ static inline int num_booting_cpus(void)
119{ 119{
120 return cpus_weight(cpu_callout_map); 120 return cpus_weight(cpu_callout_map);
121} 121}
122#else
123static inline void prefill_possible_map(void)
124{
125}
122#endif /* CONFIG_SMP */ 126#endif /* CONFIG_SMP */
123 127
124extern unsigned disabled_cpus __cpuinitdata; 128extern unsigned disabled_cpus __cpuinitdata;