irq_work: Introduce arch_irq_work_has_interrupt()
authorPeter Zijlstra <peterz@infradead.org>
Sat, 6 Sep 2014 13:43:02 +0000 (15:43 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 13 Sep 2014 16:38:07 +0000 (18:38 +0200)
The nohz full code needs irq work to trigger its own interrupt so that
the subsystem can work even when the tick is stopped.

Lets introduce arch_irq_work_has_interrupt() that archs can override to
tell about their support for this ability.

Signed-off-by: Peter Zijlstra <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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
31 files changed:
arch/alpha/include/asm/Kbuild
arch/arc/include/asm/Kbuild
arch/arm/include/asm/Kbuild
arch/arm64/include/asm/Kbuild
arch/avr32/include/asm/Kbuild
arch/blackfin/include/asm/Kbuild
arch/c6x/include/asm/Kbuild
arch/cris/include/asm/Kbuild
arch/frv/include/asm/Kbuild
arch/hexagon/include/asm/Kbuild
arch/ia64/include/asm/Kbuild
arch/m32r/include/asm/Kbuild
arch/m68k/include/asm/Kbuild
arch/metag/include/asm/Kbuild
arch/microblaze/include/asm/Kbuild
arch/mips/include/asm/Kbuild
arch/mn10300/include/asm/Kbuild
arch/openrisc/include/asm/Kbuild
arch/parisc/include/asm/Kbuild
arch/powerpc/include/asm/Kbuild
arch/s390/include/asm/Kbuild
arch/score/include/asm/Kbuild
arch/sh/include/asm/Kbuild
arch/sparc/include/asm/Kbuild
arch/tile/include/asm/Kbuild
arch/um/include/asm/Kbuild
arch/unicore32/include/asm/Kbuild
arch/x86/include/asm/Kbuild
arch/xtensa/include/asm/Kbuild
include/asm-generic/irq_work.h [new file with mode: 0644]
include/linux/irq_work.h

index e858aa0ad8af3cc4008b464914c264acd39e3980..a52cbf178c3ad063defccabf4ccb23aa4eb7db4a 100644 (file)
@@ -4,6 +4,7 @@ generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += scatterlist.h
index e76fd79f32b0126ee2e83dfaa5ba05d3d4c98452..b8fffc1a2ac237b8feca4a42cc0fd036a9bc8ba2 100644 (file)
@@ -18,6 +18,7 @@ generic-y += ioctl.h
 generic-y += ioctls.h
 generic-y += ipcbuf.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += kmap_types.h
 generic-y += kvm_para.h
 generic-y += local.h
index 70cd84eb7fda0c294c004d83841462bb4df799a5..202905e7ea0c07a3d5e7223a3a103e6c8394ab38 100644 (file)
@@ -11,6 +11,7 @@ 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
index 0b3fcf86e6ba735b3b074a4a028c0ec94e62fbe1..d617789b1ebdeb8e208485bac52fe473d87b41be 100644 (file)
@@ -9,8 +9,8 @@ generic-y += current.h
 generic-y += delay.h
 generic-y += div64.h
 generic-y += dma.h
-generic-y += emergency-restart.h
 generic-y += early_ioremap.h
+generic-y += emergency-restart.h
 generic-y += errno.h
 generic-y += ftrace.h
 generic-y += hash.h
@@ -19,6 +19,7 @@ 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
index 00a0f3ccd6eb994a67071d8e544762475f1ca792..2a71b1cb984821418f1f0f5b84fb19c9bbd6e72f 100644 (file)
@@ -9,6 +9,7 @@ generic-y += exec.h
 generic-y += futex.h
 generic-y += hash.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += local.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
index 0d93b9a79ca9561399a152d25a3545a09496b858..46ed6bb9c6798a6ff3ff749f38b0f255e0b64d6e 100644 (file)
@@ -15,6 +15,7 @@ generic-y += hw_irq.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 += kmap_types.h
 generic-y += kvm_para.h
index 8dbdce8421b08c0e58322db87002ef314778cd1b..e77e0c1dbe75ee81a189f4b74702a7110c1328fa 100644 (file)
@@ -22,6 +22,7 @@ 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 += local.h
index 31742dfadff903d0dd7a953e79f4c8cd2d780379..802b94c4ca861e362c3e3b43f314908659c2fe3e 100644 (file)
@@ -8,6 +8,7 @@ generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += kvm_para.h
 generic-y += linkage.h
 generic-y += mcs_spinlock.h
index 5b73921b6e9d32f125366a07f0f1270b0d46e260..3caf05cabfc520a06506e6318203421ad7014f66 100644 (file)
@@ -3,6 +3,7 @@ generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += scatterlist.h
index 0e69796b58c763d83e5b5eb99ed19cdfb951b9eb..5f234a5a23201319e26e9972abd1a31ab44f2d9c 100644 (file)
@@ -23,6 +23,7 @@ generic-y += ioctls.h
 generic-y += iomap.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 += local.h
index e8317d2d6c8d4462fe2536e5863ba628e3e44194..747320be9d0e1c4a94bc72cad21ed3b44ab2c3f8 100644 (file)
@@ -2,6 +2,7 @@
 generic-y += clkdev.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
index accc10a3dc78f09bd7dab56a0907ed1be2925da9..e02448b0648bb7144a7fec2982c38a2df985aff3 100644 (file)
@@ -3,6 +3,7 @@ generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += module.h
 generic-y += preempt.h
index c67c94a2d67229a461239a4335def5d90d597abe..dbaf9f3065e8da6802e4beb32706a936264d597c 100644 (file)
@@ -11,6 +11,7 @@ generic-y += hw_irq.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 += kmap_types.h
 generic-y += kvm_para.h
index c29ead89a31778da9d5f217b6cc984c1176a6772..7b8111c8f937ba5d5f0820ad64e56cf1e5e4ef6b 100644 (file)
@@ -19,6 +19,7 @@ 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
index 27a3acda6c1904a05167b96efb006dcdd56f83ce..448143b8cabd1a8f5e5460d4c79461b0ef6b6bc6 100644 (file)
@@ -5,6 +5,7 @@ generic-y += cputime.h
 generic-y += device.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += scatterlist.h
index 335e5290ec759f670aea360e53cd85293cdfa7f3..57012ef1f51ea102faf35f911009aa14ce846a98 100644 (file)
@@ -3,6 +3,7 @@ generic-y += cputime.h
 generic-y += current.h
 generic-y += emergency-restart.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
 generic-y += mutex.h
index ecbd6676bd338c70a5ad9d1d2ece7b28f996dc21..77eb1a68d13b5eda56c7bca78598225459d56681 100644 (file)
@@ -4,6 +4,7 @@ generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += exec.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += scatterlist.h
index 480af0d9c2f5dbe20fb39dc6331648dacb043a97..89b61d7dc790ee7b0127072b1a66d181eae11522 100644 (file)
@@ -31,6 +31,7 @@ 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
index ecf25e6678ad5a2f0e2bd63761699e85c9d2d759..ffb024b8423fa55a282fbfa05fbf4fb13464d4c4 100644 (file)
@@ -10,6 +10,7 @@ generic-y += exec.h
 generic-y += hash.h
 generic-y += hw_irq.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += kdebug.h
 generic-y += kvm_para.h
 generic-y += local.h
index 7f23f162ce9c0c40a9e29eebba12cdd1db4c6704..31e8f59aff38894c0b16629b2ce7cc18fecbfb2c 100644 (file)
@@ -1,6 +1,7 @@
 
 generic-y += clkdev.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += rwsem.h
index b3fea0722ff1f80e71809f45f61ad48b66805ea1..773f866765882fc3de528298c3e97ff9095f5f72 100644 (file)
@@ -2,6 +2,7 @@
 
 generic-y += clkdev.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += scatterlist.h
index aad209199f7e51852f40f71fb7dd1d2b11a36f16..1909d2a5b82fc4d1886d3d790c90fdcd966aa95d 100644 (file)
@@ -6,6 +6,7 @@ generic-y += barrier.h
 generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += hash.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += preempt.h
 generic-y += scatterlist.h
index c19e47dacb31bceec56abeac4c96ca32ad3a2977..5a6c9acff0d21eea4fcb802624eecbe854da9400 100644 (file)
@@ -12,6 +12,7 @@ generic-y += hash.h
 generic-y += ioctl.h
 generic-y += ipcbuf.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += kvm_para.h
 generic-y += local.h
 generic-y += local64.h
index cdd1b447bb6cac1f10cc2a5239e1a477f7e6bb06..f5f94ce1692c42ddab2088c1c0a8d480a6294bfa 100644 (file)
@@ -8,6 +8,7 @@ generic-y += emergency-restart.h
 generic-y += exec.h
 generic-y += hash.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += linkage.h
 generic-y += local.h
 generic-y += local64.h
index 0aa5675e7025e1f791da57ed9bc52133dd4121da..e6462b8a62842534f8e8ffe9eb628e586aaf8ec3 100644 (file)
@@ -17,6 +17,7 @@ generic-y += ioctl.h
 generic-y += ioctls.h
 generic-y += ipcbuf.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += local.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
index 7bd64aa2e94a40599211460fc615fe0dd12c7680..244b12c8cb391b9e7fec48c2846a818a9e4db93e 100644 (file)
@@ -14,6 +14,7 @@ generic-y += hash.h
 generic-y += hw_irq.h
 generic-y += io.h
 generic-y += irq_regs.h
+generic-y += irq_work.h
 generic-y += kdebug.h
 generic-y += mcs_spinlock.h
 generic-y += mutex.h
index 1e5fb872a4aa60d3292705b8bc34a69a9038d85a..5a2bb53faa42137607feafad23e3896e9249d078 100644 (file)
@@ -22,6 +22,7 @@ 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 += local.h
index 3bf000fab0aeb51b3fa23bfa1faca8b3a581febc..8fa909cc655368d088401f53406f280e6460c96a 100644 (file)
@@ -7,5 +7,6 @@ genhdr-y += unistd_x32.h
 generic-y += clkdev.h
 generic-y += cputime.h
 generic-y += early_ioremap.h
+generic-y += irq_work.h
 generic-y += mcs_spinlock.h
 generic-y += scatterlist.h
index c3d20ba6eb86d6f7d42102f076f6085bcbe096c8..105d38922c442624fd4bfadb5a5e475857adf041 100644 (file)
@@ -12,6 +12,7 @@ generic-y += hardirq.h
 generic-y += hash.h
 generic-y += ioctl.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/include/asm-generic/irq_work.h b/include/asm-generic/irq_work.h
new file mode 100644 (file)
index 0000000..a44f452
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef __ASM_IRQ_WORK_H
+#define __ASM_IRQ_WORK_H
+
+static inline bool arch_irq_work_has_interrupt(void)
+{
+       return false;
+}
+
+#endif /* __ASM_IRQ_WORK_H */
+
index bf9422c3aefe22ddd7efa63b3f88502c0659b0b5..6b47b2ede405c6ced957c5a716a11c90db06ac54 100644 (file)
@@ -42,6 +42,8 @@ void irq_work_run(void);
 void irq_work_sync(struct irq_work *work);
 
 #ifdef CONFIG_IRQ_WORK
+#include <asm/irq_work.h>
+
 bool irq_work_needs_cpu(void);
 #else
 static inline bool irq_work_needs_cpu(void) { return false; }