arm: Tell irq work about self IPI support
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 16 Aug 2014 16:47:53 +0000 (18:47 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 13 Sep 2014 16:38:39 +0000 (18:38 +0200)
ARM irq work IPI support depends on SMP support. That information is
partly known at early boottime. Lets implement
arch_irq_work_has_interrupt() accordingly.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
arch/arm/include/asm/Kbuild
arch/arm/include/asm/irq_work.h [new file with mode: 0644]
arch/arm/kernel/smp.c

index 202905e7ea0c07a3d5e7223a3a103e6c8394ab38..70cd84eb7fda0c294c004d83841462bb4df799a5 100644 (file)
@@ -11,7 +11,6 @@ generic-y += hash.h
 generic-y += ioctl.h
 generic-y += ipcbuf.h
 generic-y += irq_regs.h
-generic-y += irq_work.h
 generic-y += kdebug.h
 generic-y += local.h
 generic-y += local64.h
diff --git a/arch/arm/include/asm/irq_work.h b/arch/arm/include/asm/irq_work.h
new file mode 100644 (file)
index 0000000..712d03e
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __ASM_ARM_IRQ_WORK_H
+#define __ASM_ARM_IRQ_WORK_H
+
+#include <asm/smp_plat.h>
+
+static inline bool arch_irq_work_has_interrupt(void)
+{
+       return is_smp();
+}
+
+#endif /* _ASM_ARM_IRQ_WORK_H */
index 9388a3d479e1372279d67e95ba637b91f73c679f..bbe22fcb78f6c2383fae3eab6e87592baca4cea9 100644 (file)
@@ -503,7 +503,7 @@ void arch_send_call_function_single_ipi(int cpu)
 #ifdef CONFIG_IRQ_WORK
 void arch_irq_work_raise(void)
 {
-       if (is_smp())
+       if (arch_irq_work_has_interrupt())
                smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK);
 }
 #endif