diff options
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 344e52b16c8c..167e3cbe1f2f 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -318,9 +318,13 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
318 | smp_store_cpu_info(cpu); | 318 | smp_store_cpu_info(cpu); |
319 | 319 | ||
320 | /* | 320 | /* |
321 | * OK, now it's safe to let the boot CPU continue | 321 | * OK, now it's safe to let the boot CPU continue. Wait for |
322 | * the CPU migration code to notice that the CPU is online | ||
323 | * before we continue. | ||
322 | */ | 324 | */ |
323 | set_cpu_online(cpu, true); | 325 | set_cpu_online(cpu, true); |
326 | while (!cpu_active(cpu)) | ||
327 | cpu_relax(); | ||
324 | 328 | ||
325 | /* | 329 | /* |
326 | * OK, it's off to the idle thread for us | 330 | * OK, it's off to the idle thread for us |
@@ -361,8 +365,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
361 | */ | 365 | */ |
362 | if (max_cpus > ncores) | 366 | if (max_cpus > ncores) |
363 | max_cpus = ncores; | 367 | max_cpus = ncores; |
364 | 368 | if (ncores > 1 && max_cpus) { | |
365 | if (max_cpus > 1) { | ||
366 | /* | 369 | /* |
367 | * Enable the local timer or broadcast device for the | 370 | * Enable the local timer or broadcast device for the |
368 | * boot CPU, but only if we have more than one CPU. | 371 | * boot CPU, but only if we have more than one CPU. |
@@ -370,6 +373,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
370 | percpu_timer_setup(); | 373 | percpu_timer_setup(); |
371 | 374 | ||
372 | /* | 375 | /* |
376 | * Initialise the present map, which describes the set of CPUs | ||
377 | * actually populated at the present time. A platform should | ||
378 | * re-initialize the map in platform_smp_prepare_cpus() if | ||
379 | * present != possible (e.g. physical hotplug). | ||
380 | */ | ||
381 | init_cpu_present(&cpu_possible_map); | ||
382 | |||
383 | /* | ||
373 | * Initialise the SCU if there are more than one CPU | 384 | * Initialise the SCU if there are more than one CPU |
374 | * and let them know where to start. | 385 | * and let them know where to start. |
375 | */ | 386 | */ |