aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-09-08 13:38:52 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-09-10 21:27:57 -0400
commit757cbd46d11cfa7506b7dd5dd6657ae645bf6a17 (patch)
treee8d13af7e6fcf5ef34f24dc4f2538b9f1f31d4c1 /arch/powerpc/kernel/smp.c
parent8708d002c416b8bf87351bc626d15d7407896edb (diff)
powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops
The following commit introduced a compile error since it removed the implementation of smp_85xx_basic_setup: commit 77c0a700c1c292edafa11c1e52821ce4636f81b0 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Fri Aug 28 14:25:04 2009 +1000 powerpc: Properly start decrementer on BookE secondary CPUs Make it so that smp_ops probe() and setup_cpu() can be set to NULL. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 96f107cc0160..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
@@ -493,7 +496,8 @@ int __devinit start_secondary(void *unused)
493 preempt_disable(); 496 preempt_disable();
494 cpu_callin_map[cpu] = 1; 497 cpu_callin_map[cpu] = 1;
495 498
496 smp_ops->setup_cpu(cpu); 499 if (smp_ops->setup_cpu)
500 smp_ops->setup_cpu(cpu);
497 if (smp_ops->take_timebase) 501 if (smp_ops->take_timebase)
498 smp_ops->take_timebase(); 502 smp_ops->take_timebase();
499 503
@@ -556,7 +560,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
556 old_mask = current->cpus_allowed; 560 old_mask = current->cpus_allowed;
557 set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); 561 set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid));
558 562
559 if (smp_ops) 563 if (smp_ops && smp_ops->setup_cpu)
560 smp_ops->setup_cpu(boot_cpuid); 564 smp_ops->setup_cpu(boot_cpuid);
561 565
562 set_cpus_allowed(current, old_mask); 566 set_cpus_allowed(current, old_mask);