diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-02-23 07:23:27 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-02-27 12:30:36 -0500 |
commit | 9b6695a8adfe0916e81ddd810a5b9db3eb8b0e46 (patch) | |
tree | 62ba9475530c88ccf2149cd58eabd97ebe096aca /include | |
parent | 3e6cb2d38a9c9758170813497a860c64543643d5 (diff) |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/smp.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h index 5618f1e12f40..75c6fe7c2126 100644 --- a/include/asm-mips/smp.h +++ b/include/asm-mips/smp.h | |||
@@ -58,7 +58,9 @@ static inline int num_booting_cpus(void) | |||
58 | return cpus_weight(cpu_callout_map); | 58 | return cpus_weight(cpu_callout_map); |
59 | } | 59 | } |
60 | 60 | ||
61 | /* These are defined by the board-specific code. */ | 61 | /* |
62 | * These are defined by the board-specific code. | ||
63 | */ | ||
62 | 64 | ||
63 | /* | 65 | /* |
64 | * Cause the function described by call_data to be executed on the passed | 66 | * Cause the function described by call_data to be executed on the passed |
@@ -79,7 +81,12 @@ extern void prom_boot_secondary(int cpu, struct task_struct *idle); | |||
79 | extern void prom_init_secondary(void); | 81 | extern void prom_init_secondary(void); |
80 | 82 | ||
81 | /* | 83 | /* |
82 | * Detect available CPUs, populate phys_cpu_present_map before smp_init | 84 | * Populate cpu_possible_map before smp_init, called from setup_arch. |
85 | */ | ||
86 | extern void plat_smp_setup(void); | ||
87 | |||
88 | /* | ||
89 | * Called after init_IRQ but before __cpu_up. | ||
83 | */ | 90 | */ |
84 | extern void prom_prepare_cpus(unsigned int max_cpus); | 91 | extern void prom_prepare_cpus(unsigned int max_cpus); |
85 | 92 | ||