diff options
author | Olof Johansson <olof@lixom.net> | 2007-10-19 19:49:50 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 00:11:46 -0500 |
commit | 194046a17ee2600908541bc9cd5d6d421805f132 (patch) | |
tree | b4920a697f248db4537169df61f3a564caa0e1ab /arch | |
parent | 2c0b713f70ecccaf4f535caf602f41350a9f484a (diff) |
[POWERPC] MPIC: Minor optimization of ipi handler
Optimize MPIC IPIs, by passing in the IPI number as the argument to the
handler, since all we did was translate it back based on which mpic
the interrupt came though on (and that was always the primary mpic).
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index e47938899a92..116173ab58ba 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -612,12 +612,11 @@ static inline void mpic_eoi(struct mpic *mpic) | |||
612 | } | 612 | } |
613 | 613 | ||
614 | #ifdef CONFIG_SMP | 614 | #ifdef CONFIG_SMP |
615 | static irqreturn_t mpic_ipi_action(int irq, void *dev_id) | 615 | static irqreturn_t mpic_ipi_action(int irq, void *data) |
616 | { | 616 | { |
617 | struct mpic *mpic; | 617 | long ipi = (long)data; |
618 | 618 | ||
619 | mpic = mpic_find(irq, NULL); | 619 | smp_message_recv(ipi); |
620 | smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]); | ||
621 | 620 | ||
622 | return IRQ_HANDLED; | 621 | return IRQ_HANDLED; |
623 | } | 622 | } |
@@ -1457,7 +1456,7 @@ unsigned int mpic_get_irq(void) | |||
1457 | void mpic_request_ipis(void) | 1456 | void mpic_request_ipis(void) |
1458 | { | 1457 | { |
1459 | struct mpic *mpic = mpic_primary; | 1458 | struct mpic *mpic = mpic_primary; |
1460 | int i, err; | 1459 | long i, err; |
1461 | static char *ipi_names[] = { | 1460 | static char *ipi_names[] = { |
1462 | "IPI0 (call function)", | 1461 | "IPI0 (call function)", |
1463 | "IPI1 (reschedule)", | 1462 | "IPI1 (reschedule)", |
@@ -1472,14 +1471,14 @@ void mpic_request_ipis(void) | |||
1472 | unsigned int vipi = irq_create_mapping(mpic->irqhost, | 1471 | unsigned int vipi = irq_create_mapping(mpic->irqhost, |
1473 | mpic->ipi_vecs[0] + i); | 1472 | mpic->ipi_vecs[0] + i); |
1474 | if (vipi == NO_IRQ) { | 1473 | if (vipi == NO_IRQ) { |
1475 | printk(KERN_ERR "Failed to map IPI %d\n", i); | 1474 | printk(KERN_ERR "Failed to map IPI %ld\n", i); |
1476 | break; | 1475 | break; |
1477 | } | 1476 | } |
1478 | err = request_irq(vipi, mpic_ipi_action, | 1477 | err = request_irq(vipi, mpic_ipi_action, |
1479 | IRQF_DISABLED|IRQF_PERCPU, | 1478 | IRQF_DISABLED|IRQF_PERCPU, |
1480 | ipi_names[i], mpic); | 1479 | ipi_names[i], (void *)i); |
1481 | if (err) { | 1480 | if (err) { |
1482 | printk(KERN_ERR "Request of irq %d for IPI %d failed\n", | 1481 | printk(KERN_ERR "Request of irq %d for IPI %ld failed\n", |
1483 | vipi, i); | 1482 | vipi, i); |
1484 | break; | 1483 | break; |
1485 | } | 1484 | } |