[MIPS] SMP: Fix initialization order bug.
A recent change requires cpu_possible_map to be initialized before smp_sched_init() but most MIPS platforms were initializing their processors in the prom_prepare_cpus callback of smp_prepare_cpus. The simple fix of calling prom_prepare_cpus from one of the earlier SMP initialization hooks doesn't work well either since IPIs may require init_IRQ() to have completed, so bit the bullet and split prom_prepare_cpus into two initialization functions, plat_smp_setup which is called early from setup_arch and plat_prepare_cpus called where prom_prepare_cpus used to be called. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
@@ -236,7 +236,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
init_new_context(current, &init_mm);
|
||||
current_thread_info()->cpu = 0;
|
||||
smp_tune_scheduling();
|
||||
prom_prepare_cpus(max_cpus);
|
||||
plat_prepare_cpus(max_cpus);
|
||||
}
|
||||
|
||||
/* preload SMP state for boot cpu */
|
||||
|
Reference in New Issue
Block a user