aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/sysdev/mpic.c21
-rw-r--r--arch/ppc64/kernel/smp.c22
-rw-r--r--include/asm-powerpc/mpic.h3
-rw-r--r--include/asm-ppc64/smp.h1
4 files changed, 24 insertions, 23 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 02b4d2488bfd..3948e759d41a 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -904,4 +904,25 @@ void mpic_request_ipis(void)
904 904
905 printk("IPIs requested... \n"); 905 printk("IPIs requested... \n");
906} 906}
907
908void smp_mpic_message_pass(int target, int msg)
909{
910 /* make sure we're sending something that translates to an IPI */
911 if ((unsigned int)msg > 3) {
912 printk("SMP %d: smp_message_pass: unknown msg %d\n",
913 smp_processor_id(), msg);
914 return;
915 }
916 switch (target) {
917 case MSG_ALL:
918 mpic_send_ipi(msg, 0xffffffff);
919 break;
920 case MSG_ALL_BUT_SELF:
921 mpic_send_ipi(msg, 0xffffffff & ~(1 << smp_processor_id()));
922 break;
923 default:
924 mpic_send_ipi(msg, 1 << target);
925 break;
926 }
927}
907#endif /* CONFIG_SMP */ 928#endif /* CONFIG_SMP */
diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
index 6f4f3da12a63..192e3239fadc 100644
--- a/arch/ppc64/kernel/smp.c
+++ b/arch/ppc64/kernel/smp.c
@@ -69,28 +69,6 @@ void smp_call_function_interrupt(void);
69int smt_enabled_at_boot = 1; 69int smt_enabled_at_boot = 1;
70 70
71#ifdef CONFIG_MPIC 71#ifdef CONFIG_MPIC
72void smp_mpic_message_pass(int target, int msg)
73{
74 /* make sure we're sending something that translates to an IPI */
75 if ( msg > 0x3 ){
76 printk("SMP %d: smp_message_pass: unknown msg %d\n",
77 smp_processor_id(), msg);
78 return;
79 }
80 switch ( target )
81 {
82 case MSG_ALL:
83 mpic_send_ipi(msg, 0xffffffff);
84 break;
85 case MSG_ALL_BUT_SELF:
86 mpic_send_ipi(msg, 0xffffffff & ~(1 << smp_processor_id()));
87 break;
88 default:
89 mpic_send_ipi(msg, 1 << target);
90 break;
91 }
92}
93
94int __init smp_mpic_probe(void) 72int __init smp_mpic_probe(void)
95{ 73{
96 int nr_cpus; 74 int nr_cpus;
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
index 6b558aeb9cb9..7083d1f74260 100644
--- a/include/asm-powerpc/mpic.h
+++ b/include/asm-powerpc/mpic.h
@@ -273,6 +273,9 @@ extern void mpic_request_ipis(void);
273/* Send an IPI (non offseted number 0..3) */ 273/* Send an IPI (non offseted number 0..3) */
274extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask); 274extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask);
275 275
276/* Send a message (IPI) to a given target (cpu number or MSG_*) */
277void smp_mpic_message_pass(int target, int msg);
278
276/* Fetch interrupt from a given mpic */ 279/* Fetch interrupt from a given mpic */
277extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); 280extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs);
278/* This one gets to the primary mpic */ 281/* This one gets to the primary mpic */
diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h
index d86f742e9a21..c5e9052e7967 100644
--- a/include/asm-ppc64/smp.h
+++ b/include/asm-ppc64/smp.h
@@ -77,7 +77,6 @@ extern int smt_enabled_at_boot;
77 77
78extern int smp_mpic_probe(void); 78extern int smp_mpic_probe(void);
79extern void smp_mpic_setup_cpu(int cpu); 79extern void smp_mpic_setup_cpu(int cpu);
80extern void smp_mpic_message_pass(int target, int msg);
81extern void smp_generic_kick_cpu(int nr); 80extern void smp_generic_kick_cpu(int nr);
82 81
83extern void smp_generic_give_timebase(void); 82extern void smp_generic_give_timebase(void);