[PATCH 15/16] powerpc cell: use smp_request_message_ipi
Milton Miller
miltonm at bga.com
Fri Oct 10 22:56:50 EST 2008
cell native has 4 interrupts for ipis, so use the new smp_request_message_ipi
to save pathlength and the data-dependent branch.
This has the side effects of enabling the debugger ipi for kdump and
setting IRQF_PERCPU for the ipi interrupts. It doesn't undo the virq
mapping if it turns out the ipi is not used.
Signed-off-by: Milton Miller <miltonm at bga.com>
Index: next.git/arch/powerpc/platforms/cell/interrupt.c
===================================================================
--- next.git.orig/arch/powerpc/platforms/cell/interrupt.c 2008-10-04 23:40:24.000000000 -0500
+++ next.git/arch/powerpc/platforms/cell/interrupt.c 2008-10-04 23:44:49.000000000 -0500
@@ -190,38 +190,25 @@ struct irq_host *iic_get_irq_host(int no
}
EXPORT_SYMBOL_GPL(iic_get_irq_host);
-static irqreturn_t iic_ipi_action(int irq, void *dev_id)
-{
- int ipi = (int)(long)dev_id;
-
- smp_message_recv(ipi);
-
- return IRQ_HANDLED;
-}
-static void iic_request_ipi(int ipi, const char *name)
+static void iic_request_ipi(int ipi)
{
int virq;
virq = irq_create_mapping(iic_host, iic_ipi_to_irq(ipi));
if (virq == NO_IRQ) {
printk(KERN_ERR
- "iic: failed to map IPI %s\n", name);
+ "iic: failed to map IPI %s\n", smp_ipi_name[ipi]);
return;
}
- if (request_irq(virq, iic_ipi_action, IRQF_DISABLED, name,
- (void *)(long)ipi))
- printk(KERN_ERR
- "iic: failed to request IPI %s\n", name);
+ smp_request_message_ipi(virq, ipi);
}
void iic_request_IPIs(void)
{
- iic_request_ipi(PPC_MSG_CALL_FUNCTION, "IPI-call");
- iic_request_ipi(PPC_MSG_RESCHEDULE, "IPI-resched");
- iic_request_ipi(PPC_MSG_CALL_FUNC_SINGLE, "IPI-call-single");
-#ifdef CONFIG_DEBUGGER
- iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug");
-#endif /* CONFIG_DEBUGGER */
+ iic_request_ipi(PPC_MSG_CALL_FUNCTION);
+ iic_request_ipi(PPC_MSG_RESCHEDULE);
+ iic_request_ipi(PPC_MSG_CALL_FUNC_SINGLE);
+ iic_request_ipi(PPC_MSG_DEBUGGER_BREAK);
}
#endif /* CONFIG_SMP */
More information about the Linuxppc-dev
mailing list