aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-02-22 16:18:01 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:43 -0400
commitb727a60258730b331519fedda503a8da78638791 (patch)
treeaaf081d988fbc67ce5038f3a5613483ce805e740
parent0ac354801a879181471331c5b9be021bf5b9d515 (diff)
Merge do_boot_cpu() into the new style __cpu_up().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/smp.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 1d3a4b501949..d1828ef5ffd6 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -248,23 +248,28 @@ void __devinit smp_prepare_boot_cpu(void)
248} 248}
249 249
250/* 250/*
251 * Startup the CPU with this logical number 251 * Called once for each "cpu_possible(cpu)". Needs to spin up the cpu
252 * and keep control until "cpu_online(cpu)" is set. Note: cpu is
253 * physical, not logical.
252 */ 254 */
253static int __init do_boot_cpu(int cpu) 255int __devinit __cpu_up(unsigned int cpu)
254{ 256{
255 struct task_struct *idle; 257 struct task_struct *idle;
256 258
257 /* 259 /*
260 * Processor goes to start_secondary(), sets online flag
258 * The following code is purely to make sure 261 * The following code is purely to make sure
259 * Linux can schedule processes on this slave. 262 * Linux can schedule processes on this slave.
260 */ 263 */
261 idle = fork_idle(cpu); 264 idle = fork_idle(cpu);
262 if (IS_ERR(idle)) 265 if (IS_ERR(idle))
263 panic("failed fork for CPU %d\n", cpu); 266 panic(KERN_ERR "Fork failed for CPU %d", cpu);
264 267
265 prom_boot_secondary(cpu, idle); 268 prom_boot_secondary(cpu, idle);
266 269
267 /* XXXKW timeout */ 270 /*
271 * Trust is futile. We should really have timeouts ...
272 */
268 while (!cpu_isset(cpu, cpu_callin_map)) 273 while (!cpu_isset(cpu, cpu_callin_map))
269 udelay(100); 274 udelay(100);
270 275
@@ -273,23 +278,6 @@ static int __init do_boot_cpu(int cpu)
273 return 0; 278 return 0;
274} 279}
275 280
276/*
277 * Called once for each "cpu_possible(cpu)". Needs to spin up the cpu
278 * and keep control until "cpu_online(cpu)" is set. Note: cpu is
279 * physical, not logical.
280 */
281int __devinit __cpu_up(unsigned int cpu)
282{
283 int ret;
284
285 /* Processor goes to start_secondary(), sets online flag */
286 ret = do_boot_cpu(cpu);
287 if (ret < 0)
288 return ret;
289
290 return 0;
291}
292
293/* Not really SMP stuff ... */ 281/* Not really SMP stuff ... */
294int setup_profiling_timer(unsigned int multiplier) 282int setup_profiling_timer(unsigned int multiplier)
295{ 283{