aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2008-10-09 21:56:50 -0400
committerPaul Mackerras <paulus@samba.org>2008-11-19 00:05:07 -0500
commit78608dd32ce46789e970d6c3c423cd668c138d6c (patch)
treea94ee294909982def3cd3a0d19ca37c5895b5510 /arch/powerpc
parent25ddd738c2ebffb6c2d3cf29c91b986d1bb39c99 (diff)
powerpc/mpic: Use new smp_request_message_ipi
MPIC has 4 ipis, so it can use the new smp_request_message_ipi to reduce pathlength when receiving an ipi. This has the side effect of using the common ipi names, and also continuing to try request the remaining messages when one fails. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/sysdev/mpic.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index f6299cca7814..86a7346f6f20 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -661,17 +661,6 @@ static inline void mpic_eoi(struct mpic *mpic)
661 (void)mpic_cpu_read(MPIC_INFO(CPU_WHOAMI)); 661 (void)mpic_cpu_read(MPIC_INFO(CPU_WHOAMI));
662} 662}
663 663
664#ifdef CONFIG_SMP
665static irqreturn_t mpic_ipi_action(int irq, void *data)
666{
667 long ipi = (long)data;
668
669 smp_message_recv(ipi);
670
671 return IRQ_HANDLED;
672}
673#endif /* CONFIG_SMP */
674
675/* 664/*
676 * Linux descriptor level callbacks 665 * Linux descriptor level callbacks
677 */ 666 */
@@ -1543,13 +1532,7 @@ unsigned int mpic_get_mcirq(void)
1543void mpic_request_ipis(void) 1532void mpic_request_ipis(void)
1544{ 1533{
1545 struct mpic *mpic = mpic_primary; 1534 struct mpic *mpic = mpic_primary;
1546 long i, err; 1535 int i;
1547 static char *ipi_names[] = {
1548 "IPI0 (call function)",
1549 "IPI1 (reschedule)",
1550 "IPI2 (call function single)",
1551 "IPI3 (debugger break)",
1552 };
1553 BUG_ON(mpic == NULL); 1536 BUG_ON(mpic == NULL);
1554 1537
1555 printk(KERN_INFO "mpic: requesting IPIs ... \n"); 1538 printk(KERN_INFO "mpic: requesting IPIs ... \n");
@@ -1558,17 +1541,10 @@ void mpic_request_ipis(void)
1558 unsigned int vipi = irq_create_mapping(mpic->irqhost, 1541 unsigned int vipi = irq_create_mapping(mpic->irqhost,
1559 mpic->ipi_vecs[0] + i); 1542 mpic->ipi_vecs[0] + i);
1560 if (vipi == NO_IRQ) { 1543 if (vipi == NO_IRQ) {
1561 printk(KERN_ERR "Failed to map IPI %ld\n", i); 1544 printk(KERN_ERR "Failed to map %s\n", smp_ipi_name[i]);
1562 break; 1545 continue;
1563 }
1564 err = request_irq(vipi, mpic_ipi_action,
1565 IRQF_DISABLED|IRQF_PERCPU,
1566 ipi_names[i], (void *)i);
1567 if (err) {
1568 printk(KERN_ERR "Request of irq %d for IPI %ld failed\n",
1569 vipi, i);
1570 break;
1571 } 1546 }
1547 smp_request_message_ipi(vipi, i);
1572 } 1548 }
1573} 1549}
1574 1550