aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/mpic.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 68ea50c41902..53121f625068 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1613,30 +1613,28 @@ void mpic_request_ipis(void)
1613 } 1613 }
1614} 1614}
1615 1615
1616static void mpic_send_ipi(unsigned int ipi_no, const struct cpumask *cpu_mask) 1616void smp_mpic_message_pass(int cpu, int msg)
1617{ 1617{
1618 struct mpic *mpic = mpic_primary; 1618 struct mpic *mpic = mpic_primary;
1619 u32 physmask;
1619 1620
1620 BUG_ON(mpic == NULL); 1621 BUG_ON(mpic == NULL);
1621 1622
1622#ifdef DEBUG_IPI
1623 DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no);
1624#endif
1625
1626 mpic_cpu_write(MPIC_INFO(CPU_IPI_DISPATCH_0) +
1627 ipi_no * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE),
1628 mpic_physmask(cpumask_bits(cpu_mask)[0]));
1629}
1630
1631void smp_mpic_message_pass(int cpu, int msg)
1632{
1633 /* make sure we're sending something that translates to an IPI */ 1623 /* make sure we're sending something that translates to an IPI */
1634 if ((unsigned int)msg > 3) { 1624 if ((unsigned int)msg > 3) {
1635 printk("SMP %d: smp_message_pass: unknown msg %d\n", 1625 printk("SMP %d: smp_message_pass: unknown msg %d\n",
1636 smp_processor_id(), msg); 1626 smp_processor_id(), msg);
1637 return; 1627 return;
1638 } 1628 }
1639 mpic_send_ipi(msg, cpumask_of(cpu)); 1629
1630#ifdef DEBUG_IPI
1631 DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, msg);
1632#endif
1633
1634 physmask = 1 << get_hard_smp_processor_id(cpu);
1635
1636 mpic_cpu_write(MPIC_INFO(CPU_IPI_DISPATCH_0) +
1637 msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask);
1640} 1638}
1641 1639
1642int __init smp_mpic_probe(void) 1640int __init smp_mpic_probe(void)