aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/smp.c10
-rw-r--r--arch/powerpc/platforms/85xx/smp.c10
2 files changed, 7 insertions, 13 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);
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 94f901da4918..04160a4cc699 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -88,25 +88,15 @@ struct smp_ops_t smp_85xx_ops = {
88 .kick_cpu = smp_85xx_kick_cpu, 88 .kick_cpu = smp_85xx_kick_cpu,
89}; 89};
90 90
91static int __init smp_dummy_probe(void)
92{
93 return NR_CPUS;
94}
95
96void __init mpc85xx_smp_init(void) 91void __init mpc85xx_smp_init(void)
97{ 92{
98 struct device_node *np; 93 struct device_node *np;
99 94
100 smp_85xx_ops.message_pass = NULL;
101
102 np = of_find_node_by_type(NULL, "open-pic"); 95 np = of_find_node_by_type(NULL, "open-pic");
103 if (np) { 96 if (np) {
104 smp_85xx_ops.probe = smp_mpic_probe; 97 smp_85xx_ops.probe = smp_mpic_probe;
105 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu; 98 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
106 smp_85xx_ops.message_pass = smp_mpic_message_pass; 99 smp_85xx_ops.message_pass = smp_mpic_message_pass;
107 } else {
108 smp_85xx_ops.probe = smp_dummy_probe;
109 smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
110 } 100 }
111 101
112 if (cpu_has_feature(CPU_FTR_DBELL)) 102 if (cpu_has_feature(CPU_FTR_DBELL))