]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: 7123/1: smp: Add an IPI handler callable from C code
authorShawn Guo <shawn.guo@linaro.org>
Thu, 6 Oct 2011 14:18:14 +0000 (15:18 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 17 Oct 2011 08:02:43 +0000 (09:02 +0100)
In order to be able to handle IPI directly from C code instead of
assembly code, introduce handle_IPI(), which is modeled after handle_IRQ().

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/smp.h
arch/arm/kernel/smp.c

index 674ebcd337fea07b64af84694007a5bdc0806013..0a17b62538c2705b0a959f18d67ad4f75aa90990 100644 (file)
@@ -32,6 +32,11 @@ extern void show_ipi_list(struct seq_file *, int);
  */
 asmlinkage void do_IPI(int ipinr, struct pt_regs *regs);
 
+/*
+ * Called from C code, this handles an IPI.
+ */
+void handle_IPI(int ipinr, struct pt_regs *regs);
+
 /*
  * Setup the set of possible CPUs (via set_cpu_possible)
  */
index 3f12ce9b079621530725d0540c5185876a958761..2e49f1883fe98844f0170df01a6ec8faaad37758 100644 (file)
@@ -586,6 +586,11 @@ static void ipi_cpu_stop(unsigned int cpu)
  * Main handler for inter-processor interrupts
  */
 asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs)
+{
+       handle_IPI(ipinr, regs);
+}
+
+void handle_IPI(int ipinr, struct pt_regs *regs)
 {
        unsigned int cpu = smp_processor_id();
        struct pt_regs *old_regs = set_irq_regs(regs);