[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1351517296-9173-4-git-send-email-fweisbec@gmail.com>
Date: Mon, 29 Oct 2012 14:28:10 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [RFC PATCH 3/9] irq_work: Move irq_work_raise() declaration/default definition to arch headers
This optimization doesn't matter much. But this prepares the
arch headers that we need to add a new API in order to detect
when the arch can trigger self IPIs to implement the irq work.
This is necessary later to make printk working in nohz CPUs.
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
---
arch/alpha/include/asm/irq_work.h | 6 ++++++
arch/arm/include/asm/irq_work.h | 1 +
arch/arm64/include/asm/irq_work.h | 1 +
arch/avr32/include/asm/irq_work.h | 1 +
arch/blackfin/include/asm/irq_work.h | 1 +
arch/c6x/include/asm/irq_work.h | 1 +
arch/cris/include/asm/irq_work.h | 1 +
arch/frv/include/asm/irq_work.h | 1 +
arch/h8300/include/asm/irq_work.h | 1 +
arch/hexagon/include/asm/irq_work.h | 1 +
arch/ia64/include/asm/irq_work.h | 1 +
arch/m32r/include/asm/irq_work.h | 1 +
arch/m68k/include/asm/irq_work.h | 1 +
arch/microblaze/include/asm/irq_work.h | 1 +
arch/mips/include/asm/irq_work.h | 1 +
arch/mn10300/include/asm/irq_work.h | 1 +
arch/openrisc/include/asm/irq_work.h | 1 +
arch/parisc/include/asm/irq_work.h | 1 +
arch/powerpc/include/asm/irq_work.h | 6 ++++++
arch/s390/include/asm/irq_work.h | 1 +
arch/score/include/asm/irq_work.h | 1 +
arch/sh/include/asm/irq_work.h | 1 +
arch/sparc/include/asm/irq_work.h | 6 ++++++
arch/tile/include/asm/irq_work.h | 1 +
arch/um/include/asm/irq_work.h | 1 +
arch/unicore32/include/asm/irq_work.h | 1 +
arch/x86/include/asm/irq_work.h | 10 ++++++++++
arch/x86/kernel/irq_work.c | 4 ++--
arch/xtensa/include/asm/irq_work.h | 1 +
include/asm-generic/irq_work.h | 9 +++++++++
include/linux/irq_work.h | 1 +
kernel/irq_work.c | 7 -------
32 files changed, 64 insertions(+), 9 deletions(-)
create mode 100644 arch/alpha/include/asm/irq_work.h
create mode 100644 arch/arm/include/asm/irq_work.h
create mode 100644 arch/arm64/include/asm/irq_work.h
create mode 100644 arch/avr32/include/asm/irq_work.h
create mode 100644 arch/blackfin/include/asm/irq_work.h
create mode 100644 arch/c6x/include/asm/irq_work.h
create mode 100644 arch/cris/include/asm/irq_work.h
create mode 100644 arch/frv/include/asm/irq_work.h
create mode 100644 arch/h8300/include/asm/irq_work.h
create mode 100644 arch/hexagon/include/asm/irq_work.h
create mode 100644 arch/ia64/include/asm/irq_work.h
create mode 100644 arch/m32r/include/asm/irq_work.h
create mode 100644 arch/m68k/include/asm/irq_work.h
create mode 100644 arch/microblaze/include/asm/irq_work.h
create mode 100644 arch/mips/include/asm/irq_work.h
create mode 100644 arch/mn10300/include/asm/irq_work.h
create mode 100644 arch/openrisc/include/asm/irq_work.h
create mode 100644 arch/parisc/include/asm/irq_work.h
create mode 100644 arch/powerpc/include/asm/irq_work.h
create mode 100644 arch/s390/include/asm/irq_work.h
create mode 100644 arch/score/include/asm/irq_work.h
create mode 100644 arch/sh/include/asm/irq_work.h
create mode 100644 arch/sparc/include/asm/irq_work.h
create mode 100644 arch/tile/include/asm/irq_work.h
create mode 100644 arch/um/include/asm/irq_work.h
create mode 100644 arch/unicore32/include/asm/irq_work.h
create mode 100644 arch/x86/include/asm/irq_work.h
create mode 100644 arch/xtensa/include/asm/irq_work.h
create mode 100644 include/asm-generic/irq_work.h
diff --git a/arch/alpha/include/asm/irq_work.h b/arch/alpha/include/asm/irq_work.h
new file mode 100644
index 0000000..814ff3d
--- /dev/null
+++ b/arch/alpha/include/asm/irq_work.h
@@ -0,0 +1,6 @@
+#ifndef _ALPHA_IRQ_WORK_H
+#define _ALPHA_IRQ_WORK_H
+
+extern void arch_irq_work_raise(void);
+
+#endif
diff --git a/arch/arm/include/asm/irq_work.h b/arch/arm/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/arm/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/arm64/include/asm/irq_work.h b/arch/arm64/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/arm64/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/avr32/include/asm/irq_work.h b/arch/avr32/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/avr32/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/blackfin/include/asm/irq_work.h b/arch/blackfin/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/blackfin/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/c6x/include/asm/irq_work.h b/arch/c6x/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/c6x/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/cris/include/asm/irq_work.h b/arch/cris/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/cris/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/frv/include/asm/irq_work.h b/arch/frv/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/frv/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/h8300/include/asm/irq_work.h b/arch/h8300/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/h8300/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/hexagon/include/asm/irq_work.h b/arch/hexagon/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/hexagon/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/ia64/include/asm/irq_work.h b/arch/ia64/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/ia64/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/m32r/include/asm/irq_work.h b/arch/m32r/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/m32r/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/m68k/include/asm/irq_work.h b/arch/m68k/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/m68k/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/microblaze/include/asm/irq_work.h b/arch/microblaze/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/microblaze/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/mips/include/asm/irq_work.h b/arch/mips/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/mips/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/mn10300/include/asm/irq_work.h b/arch/mn10300/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/mn10300/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/openrisc/include/asm/irq_work.h b/arch/openrisc/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/openrisc/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/parisc/include/asm/irq_work.h b/arch/parisc/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/parisc/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/powerpc/include/asm/irq_work.h b/arch/powerpc/include/asm/irq_work.h
new file mode 100644
index 0000000..8b9927f
--- /dev/null
+++ b/arch/powerpc/include/asm/irq_work.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_POWERPC_IRQ_WORK_H
+#define _ASM_POWERPC_IRQ_WORK_H
+
+extern void arch_irq_work_raise(void);
+
+#endif
diff --git a/arch/s390/include/asm/irq_work.h b/arch/s390/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/s390/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/score/include/asm/irq_work.h b/arch/score/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/score/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/sh/include/asm/irq_work.h b/arch/sh/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/sh/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/sparc/include/asm/irq_work.h b/arch/sparc/include/asm/irq_work.h
new file mode 100644
index 0000000..1d062a6
--- /dev/null
+++ b/arch/sparc/include/asm/irq_work.h
@@ -0,0 +1,6 @@
+#ifndef ___ASM_SPARC_IRQ_H
+#define ___ASM_SPARC_IRQ_H
+
+extern void arch_irq_work_raise(void);
+
+#endif
diff --git a/arch/tile/include/asm/irq_work.h b/arch/tile/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/tile/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/um/include/asm/irq_work.h b/arch/um/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/um/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/unicore32/include/asm/irq_work.h b/arch/unicore32/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/unicore32/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/arch/x86/include/asm/irq_work.h b/arch/x86/include/asm/irq_work.h
new file mode 100644
index 0000000..38eed96
--- /dev/null
+++ b/arch/x86/include/asm/irq_work.h
@@ -0,0 +1,10 @@
+#ifndef _ASM_X86_IRQ_WORK_H
+#define _ASM_X86_IRQ_WORK_H
+
+#ifndef CONFIG_X86_LOCAL_APIC
+#include <asm-generic/irq_work.h>
+# else
+extern void arch_irq_work_raise(void);
+#endif
+
+#endif
diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c
index ca8f703..95f5d4e 100644
--- a/arch/x86/kernel/irq_work.c
+++ b/arch/x86/kernel/irq_work.c
@@ -18,13 +18,13 @@ void smp_irq_work_interrupt(struct pt_regs *regs)
irq_exit();
}
+#ifdef CONFIG_X86_LOCAL_APIC
void arch_irq_work_raise(void)
{
-#ifdef CONFIG_X86_LOCAL_APIC
if (!cpu_has_apic)
return;
apic->send_IPI_self(IRQ_WORK_VECTOR);
apic_wait_icr_idle();
-#endif
}
+#endif
diff --git a/arch/xtensa/include/asm/irq_work.h b/arch/xtensa/include/asm/irq_work.h
new file mode 100644
index 0000000..f1bffa2
--- /dev/null
+++ b/arch/xtensa/include/asm/irq_work.h
@@ -0,0 +1 @@
+#include <asm-generic/irq_work.h>
diff --git a/include/asm-generic/irq_work.h b/include/asm-generic/irq_work.h
new file mode 100644
index 0000000..a2d4108
--- /dev/null
+++ b/include/asm-generic/irq_work.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_GENERIC_ATOMIC_H
+#define __ASM_GENERIC_ATOMIC_H
+
+/*
+ * Lame architectures will get the timer tick callback
+ */
+static inline void arch_irq_work_raise(void) { }
+
+#endif
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
index 6a9e8f5..b39ea0b 100644
--- a/include/linux/irq_work.h
+++ b/include/linux/irq_work.h
@@ -2,6 +2,7 @@
#define _LINUX_IRQ_WORK_H
#include <linux/llist.h>
+#include <asm/irq_work.h>
struct irq_work {
unsigned long flags;
diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index 679c13e..d00011c 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -56,13 +56,6 @@ static bool irq_work_claim(struct irq_work *work)
return true;
}
-void __weak arch_irq_work_raise(void)
-{
- /*
- * Lame architectures will get the timer tick callback
- */
-}
-
/*
* Queue the entry and raise the IPI if needed.
*/
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists