arm64: Tell irq work about self IPI support
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 16 Aug 2014 16:48:05 +0000 (18:48 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 13 Sep 2014 16:46:13 +0000 (18:46 +0200)
ARM64 irq work self-IPI support depends on __smp_cross_call to point to
some relevant IRQ controller operations. This information should be
available after the call to init_IRQ().

Lets implement arch_irq_work_has_interrupt() accordingly.

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

index d617789b1ebdeb8e208485bac52fe473d87b41be..c1968475cc4e2bb915f6fe13abfcc594aa565208 100644 (file)
@@ -19,7 +19,6 @@ generic-y += ioctl.h
 generic-y += ioctls.h
 generic-y += ipcbuf.h
 generic-y += irq_regs.h
-generic-y += irq_work.h
 generic-y += kdebug.h
 generic-y += kmap_types.h
 generic-y += kvm_para.h
diff --git a/arch/arm64/include/asm/irq_work.h b/arch/arm64/include/asm/irq_work.h
new file mode 100644 (file)
index 0000000..8e24ef3
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __ASM_IRQ_WORK_H
+#define __ASM_IRQ_WORK_H
+
+#include <asm/smp.h>
+
+static inline bool arch_irq_work_has_interrupt(void)
+{
+       return !!__smp_cross_call;
+}
+
+#endif /* __ASM_IRQ_WORK_H */
index a498f2cd2c2ad606d612a2192d09c93475bb1ded..780f82c827b6e733da94fab939380364c9e2b279 100644 (file)
@@ -48,6 +48,8 @@ extern void smp_init_cpus(void);
  */
 extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int));
 
+extern void (*__smp_cross_call)(const struct cpumask *, unsigned int);
+
 /*
  * Called from the secondary holding pen, this is the secondary CPU entry point.
  */
index 474339718105823e9dc55201dccfeb017df7c588..b06d1d90ee8cb223c70612515a0bed75048cc806 100644 (file)
@@ -470,7 +470,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
        }
 }
 
-static void (*__smp_cross_call)(const struct cpumask *, unsigned int);
+void (*__smp_cross_call)(const struct cpumask *, unsigned int);
 
 void __init set_smp_cross_call(void (*fn)(const struct cpumask *, unsigned int))
 {