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.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 8ebc6700b98..7bf2187dfd9 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -33,7 +33,7 @@
33#include <linux/topology.h> 33#include <linux/topology.h>
34 34
35#include <asm/ptrace.h> 35#include <asm/ptrace.h>
36#include <asm/atomic.h> 36#include <linux/atomic.h>
37#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/page.h> 38#include <asm/page.h>
39#include <asm/pgtable.h> 39#include <asm/pgtable.h>
@@ -202,14 +202,6 @@ void smp_muxed_ipi_message_pass(int cpu, int msg)
202 smp_ops->cause_ipi(cpu, info->data); 202 smp_ops->cause_ipi(cpu, info->data);
203} 203}
204 204
205void smp_muxed_ipi_resend(void)
206{
207 struct cpu_messages *info = &__get_cpu_var(ipi_message);
208
209 if (info->messages)
210 smp_ops->cause_ipi(smp_processor_id(), info->data);
211}
212
213irqreturn_t smp_ipi_demux(void) 205irqreturn_t smp_ipi_demux(void)
214{ 206{
215 struct cpu_messages *info = &__get_cpu_var(ipi_message); 207 struct cpu_messages *info = &__get_cpu_var(ipi_message);
@@ -238,15 +230,26 @@ irqreturn_t smp_ipi_demux(void)
238} 230}
239#endif /* CONFIG_PPC_SMP_MUXED_IPI */ 231#endif /* CONFIG_PPC_SMP_MUXED_IPI */
240 232
233static inline void do_message_pass(int cpu, int msg)
234{
235 if (smp_ops->message_pass)
236 smp_ops->message_pass(cpu, msg);
237#ifdef CONFIG_PPC_SMP_MUXED_IPI
238 else
239 smp_muxed_ipi_message_pass(cpu, msg);
240#endif
241}
242
241void smp_send_reschedule(int cpu) 243void smp_send_reschedule(int cpu)
242{ 244{
243 if (likely(smp_ops)) 245 if (likely(smp_ops))
244 smp_ops->message_pass(cpu, PPC_MSG_RESCHEDULE); 246 do_message_pass(cpu, PPC_MSG_RESCHEDULE);
245} 247}
248EXPORT_SYMBOL_GPL(smp_send_reschedule);
246 249
247void arch_send_call_function_single_ipi(int cpu) 250void arch_send_call_function_single_ipi(int cpu)
248{ 251{
249 smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE); 252 do_message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE);
250} 253}
251 254
252void arch_send_call_function_ipi_mask(const struct cpumask *mask) 255void arch_send_call_function_ipi_mask(const struct cpumask *mask)
@@ -254,7 +257,7 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
254 unsigned int cpu; 257 unsigned int cpu;
255 258
256 for_each_cpu(cpu, mask) 259 for_each_cpu(cpu, mask)
257 smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION); 260 do_message_pass(cpu, PPC_MSG_CALL_FUNCTION);
258} 261}
259 262
260#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) 263#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
@@ -268,7 +271,7 @@ void smp_send_debugger_break(void)
268 271
269 for_each_online_cpu(cpu) 272 for_each_online_cpu(cpu)
270 if (cpu != me) 273 if (cpu != me)
271 smp_ops->message_pass(cpu, PPC_MSG_DEBUGGER_BREAK); 274 do_message_pass(cpu, PPC_MSG_DEBUGGER_BREAK);
272} 275}
273#endif 276#endif
274 277
@@ -303,6 +306,10 @@ struct thread_info *current_set[NR_CPUS];
303static void __devinit smp_store_cpu_info(int id) 306static void __devinit smp_store_cpu_info(int id)
304{ 307{
305 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); 308 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
309#ifdef CONFIG_PPC_FSL_BOOK3E
310 per_cpu(next_tlbcam_idx, id)
311 = (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) - 1;
312#endif
306} 313}
307 314
308void __init smp_prepare_cpus(unsigned int max_cpus) 315void __init smp_prepare_cpus(unsigned int max_cpus)