aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 0b47de07302d..d387b3937ccc 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -269,7 +269,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
269 cpu_callin_map[boot_cpuid] = 1; 269 cpu_callin_map[boot_cpuid] = 1;
270 270
271 if (smp_ops) 271 if (smp_ops)
272 max_cpus = smp_ops->probe(); 272 if (smp_ops->probe)
273 max_cpus = smp_ops->probe();
274 else
275 max_cpus = NR_CPUS;
273 else 276 else
274 max_cpus = 1; 277 max_cpus = 1;
275 278
@@ -412,9 +415,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
412 * CPUs can take much longer to come up in the 415 * CPUs can take much longer to come up in the
413 * hotplug case. Wait five seconds. 416 * hotplug case. Wait five seconds.
414 */ 417 */
415 for (c = 25; c && !cpu_callin_map[cpu]; c--) { 418 for (c = 5000; c && !cpu_callin_map[cpu]; c--)
416 msleep(200); 419 msleep(1);
417 }
418#endif 420#endif
419 421
420 if (!cpu_callin_map[cpu]) { 422 if (!cpu_callin_map[cpu]) {
@@ -494,7 +496,8 @@ int __devinit start_secondary(void *unused)
494 preempt_disable(); 496 preempt_disable();
495 cpu_callin_map[cpu] = 1; 497 cpu_callin_map[cpu] = 1;
496 498
497 smp_ops->setup_cpu(cpu); 499 if (smp_ops->setup_cpu)
500 smp_ops->setup_cpu(cpu);
498 if (smp_ops->take_timebase) 501 if (smp_ops->take_timebase)
499 smp_ops->take_timebase(); 502 smp_ops->take_timebase();
500 503
@@ -557,7 +560,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
557 old_mask = current->cpus_allowed; 560 old_mask = current->cpus_allowed;
558 set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); 561 set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid));
559 562
560 if (smp_ops) 563 if (smp_ops && smp_ops->setup_cpu)
561 smp_ops->setup_cpu(boot_cpuid); 564 smp_ops->setup_cpu(boot_cpuid);
562 565
563 set_cpus_allowed(current, old_mask); 566 set_cpus_allowed(current, old_mask);