LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [GIT PULL]
@ 2018-05-08 13:38 Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 01/11] ia64: Convert local_softirq_pending() to per-cpu ops Frederic Weisbecker
` (11 more replies)
0 siblings, 12 replies; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Ingo,
Please pull the softirq/mask-v4 branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
softirq/mask-v4
HEAD: dc06cbb5e1296938211040bccdacd7a361469116
Changes since v3:
* Rebase against v4.17-rc4
* Fix build error on SH. (new patch "sh: Use nmi_count() on /proc/interrupts print out")
--
The softirq mask and its accessors/mutators have many implementations
scattered around many architectures. Most do the same things consisting
in a field in a per-cpu struct (often irq_cpustat_t) accessed through
per-cpu ops. We can provide instead a generic efficient version that
most of them can use. In fact s390 is the only exception because the
field is stored in lowcore.
Thanks,
Frederic
---
Frederic Weisbecker (11):
ia64: Convert local_softirq_pending() to per-cpu ops
sparc: Convert local_softirq_pending() to use per-cpu op
sh: Use nmi_count() on /proc/interrupts print out
softirq: Turn default irq_cpustat_t to standard per-cpu
softirq: Consolidate default local_softirq_pending() implementations
ia64: Switch to generic local_softirq_pending() implementation
parisc: Switch to generic local_softirq_pending() implementation
powerpc: Switch to generic local_softirq_pending() implementation
sparc: Switch to generic local_softirq_pending() implementation
x86: Switch to generic local_softirq_pending() implementation
softirq/s390: Move default mutators of overwritten softirq mask to s390
arch/ia64/include/asm/hardirq.h | 2 +-
arch/parisc/include/asm/hardirq.h | 8 --------
arch/powerpc/include/asm/hardirq.h | 7 -------
arch/s390/include/asm/hardirq.h | 2 ++
arch/sh/kernel/irq.c | 2 +-
arch/sparc/include/asm/hardirq_64.h | 5 +++--
arch/x86/include/asm/hardirq.h | 8 --------
include/linux/interrupt.h | 13 ++++++++++---
include/linux/irq_cpustat.h | 10 +++-------
kernel/softirq.c | 4 ++--
10 files changed, 22 insertions(+), 39 deletions(-)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 01/11] ia64: Convert local_softirq_pending() to per-cpu ops
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:47 ` [tip:irq/core] softirq/ia64: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 02/11] sparc: Convert local_softirq_pending() to use per-cpu op Frederic Weisbecker
` (10 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
In order to consolidate and optimize generic softirq mask accesses, we
first need to convert architectures to use per-cpu operations when
possible.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/ia64/include/asm/hardirq.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h
index bdc4669..22fae71 100644
--- a/arch/ia64/include/asm/hardirq.h
+++ b/arch/ia64/include/asm/hardirq.h
@@ -13,7 +13,7 @@
#define __ARCH_IRQ_STAT 1
-#define local_softirq_pending() (local_cpu_data->softirq_pending)
+#define local_softirq_pending() (*this_cpu_ptr(&ia64_cpu_info.softirq_pending))
#include <linux/threads.h>
#include <linux/irq.h>
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 02/11] sparc: Convert local_softirq_pending() to use per-cpu op
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 01/11] ia64: Convert local_softirq_pending() to per-cpu ops Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:47 ` [tip:irq/core] softirq/sparc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 03/11] sh: Use nmi_count() on /proc/interrupts print out Frederic Weisbecker
` (9 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
In order to consolidate and optimize generic softirq mask accesses, we
first need to convert architectures to use per-cpu operations when
possible.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/sparc/include/asm/hardirq_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/include/asm/hardirq_64.h b/arch/sparc/include/asm/hardirq_64.h
index f565402..6aba904 100644
--- a/arch/sparc/include/asm/hardirq_64.h
+++ b/arch/sparc/include/asm/hardirq_64.h
@@ -11,7 +11,7 @@
#define __ARCH_IRQ_STAT
#define local_softirq_pending() \
- (local_cpu_data().__softirq_pending)
+ (*this_cpu_ptr(&__cpu_data.__softirq_pending))
void ack_bad_irq(unsigned int irq);
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 03/11] sh: Use nmi_count() on /proc/interrupts print out
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 01/11] ia64: Convert local_softirq_pending() to per-cpu ops Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 02/11] sparc: Convert local_softirq_pending() to use per-cpu op Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:48 ` [tip:irq/core] softirq/sh: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 04/11] softirq: Turn default irq_cpustat_t to standard per-cpu Frederic Weisbecker
` (8 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Use nmi_count() instead of accessing directly the irq_stat structure.
Its implementation is going to change to use per-CPU, so defer the guts
to standard API instead.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/sh/kernel/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 245dbeb..5717c7c 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -44,7 +44,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_printf(p, "%*s: ", prec, "NMI");
for_each_online_cpu(j)
- seq_printf(p, "%10u ", irq_stat[j].__nmi_count);
+ seq_printf(p, "%10u ", nmi_count(j));
seq_printf(p, " Non-maskable interrupts\n");
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 04/11] softirq: Turn default irq_cpustat_t to standard per-cpu
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (2 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 03/11] sh: Use nmi_count() on /proc/interrupts print out Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:48 ` [tip:irq/core] softirq/core: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 05/11] softirq: Consolidate default local_softirq_pending() implementations Frederic Weisbecker
` (7 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
In order to optimize and consolidate softirq mask accesses, let's
convert the default irq_cpustat_t implementation to per-CPU standard API.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
include/linux/irq_cpustat.h | 4 ++--
kernel/softirq.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index 4954948..ddea03c 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -18,8 +18,8 @@
*/
#ifndef __ARCH_IRQ_STAT
-extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
-#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
+DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */
+#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu))
#endif
/* arch independent irq_stat fields */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 177de36..c5fafd7 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -49,8 +49,8 @@
*/
#ifndef __ARCH_IRQ_STAT
-irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
-EXPORT_SYMBOL(irq_stat);
+DEFINE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat);
+EXPORT_PER_CPU_SYMBOL(irq_stat);
#endif
static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp;
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 05/11] softirq: Consolidate default local_softirq_pending() implementations
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (3 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 04/11] softirq: Turn default irq_cpustat_t to standard per-cpu Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:49 ` [tip:irq/core] softirq/core: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 06/11] ia64: Switch to generic local_softirq_pending() implementation Frederic Weisbecker
` (6 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Consolidate and optimize default softirq mask API implementations.
Per-CPU operations are expected to be faster and a few architectures
already rely on them to implement local_softirq_pending() and related
accessors/mutators. Those will be migrated to the new generic code.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
include/linux/interrupt.h | 14 ++++++++++++++
include/linux/irq_cpustat.h | 6 +-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5426627..7a11f73 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -432,11 +432,25 @@ extern bool force_irqthreads;
#define force_irqthreads (0)
#endif
+#ifndef local_softirq_pending
+
+#ifndef local_softirq_pending_ref
+#define local_softirq_pending_ref irq_stat.__softirq_pending
+#endif
+
+#define local_softirq_pending() (__this_cpu_read(local_softirq_pending_ref))
+#define set_softirq_pending(x) (__this_cpu_write(local_softirq_pending_ref, (x)))
+#define or_softirq_pending(x) (__this_cpu_or(local_softirq_pending_ref, (x)))
+
+#else /* local_softirq_pending */
+
#ifndef __ARCH_SET_SOFTIRQ_PENDING
#define set_softirq_pending(x) (local_softirq_pending() = (x))
#define or_softirq_pending(x) (local_softirq_pending() |= (x))
#endif
+#endif /* local_softirq_pending */
+
/* Some architectures might implement lazy enabling/disabling of
* interrupts. In some cases, such as stop_machine, we might want
* to ensure that after a local_irq_disable(), interrupts have
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index ddea03c..6e8895c 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -22,11 +22,7 @@ DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */
#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu))
#endif
- /* arch independent irq_stat fields */
-#define local_softirq_pending() \
- __IRQ_STAT(smp_processor_id(), __softirq_pending)
-
- /* arch dependent irq_stat fields */
+/* arch dependent irq_stat fields */
#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) /* i386 */
#endif /* __irq_cpustat_h */
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 06/11] ia64: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (4 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 05/11] softirq: Consolidate default local_softirq_pending() implementations Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:49 ` [tip:irq/core] softirq/ia64: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 07/11] parisc: " Frederic Weisbecker
` (5 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Benefit from the generic softirq mask implementation that rely on per-CPU
mutators instead of working with raw operators on top of this_cpu_ptr().
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/ia64/include/asm/hardirq.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h
index 22fae71..ccde7c2 100644
--- a/arch/ia64/include/asm/hardirq.h
+++ b/arch/ia64/include/asm/hardirq.h
@@ -13,7 +13,7 @@
#define __ARCH_IRQ_STAT 1
-#define local_softirq_pending() (*this_cpu_ptr(&ia64_cpu_info.softirq_pending))
+#define local_softirq_pending_ref ia64_cpu_info.softirq_pending
#include <linux/threads.h>
#include <linux/irq.h>
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 07/11] parisc: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (5 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 06/11] ia64: Switch to generic local_softirq_pending() implementation Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:50 ` [tip:irq/core] softirq/parisc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 08/11] powerpc: " Frederic Weisbecker
` (4 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Remove the ad-hoc implementation, the generic code now allows us not to
reinvent the wheel.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/parisc/include/asm/hardirq.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/parisc/include/asm/hardirq.h b/arch/parisc/include/asm/hardirq.h
index 0778151..1a1235a 100644
--- a/arch/parisc/include/asm/hardirq.h
+++ b/arch/parisc/include/asm/hardirq.h
@@ -34,14 +34,6 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
#define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member)
-#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
-
-#define __ARCH_SET_SOFTIRQ_PENDING
-
-#define set_softirq_pending(x) \
- this_cpu_write(irq_stat.__softirq_pending, (x))
-#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
-
#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
#endif /* _PARISC_HARDIRQ_H */
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 08/11] powerpc: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (6 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 07/11] parisc: " Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:50 ` [tip:irq/core] softirq/powerpc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 09/11] sparc: " Frederic Weisbecker
` (3 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Remove the ad-hoc implementation, the generic code now allows us not to
reinvent the wheel.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/powerpc/include/asm/hardirq.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h
index 5986d47..383f628 100644
--- a/arch/powerpc/include/asm/hardirq.h
+++ b/arch/powerpc/include/asm/hardirq.h
@@ -25,15 +25,8 @@ typedef struct {
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
#define __ARCH_IRQ_STAT
-
-#define local_softirq_pending() __this_cpu_read(irq_stat.__softirq_pending)
-
-#define __ARCH_SET_SOFTIRQ_PENDING
#define __ARCH_IRQ_EXIT_IRQS_DISABLED
-#define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x))
-#define or_softirq_pending(x) __this_cpu_or(irq_stat.__softirq_pending, (x))
-
static inline void ack_bad_irq(unsigned int irq)
{
printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 09/11] sparc: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (7 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 08/11] powerpc: " Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:51 ` [tip:irq/core] softirq/sparc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 10/11] x86: " Frederic Weisbecker
` (2 subsequent siblings)
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Benefit from the generic softirq mask implementation that rely on per-CPU
mutators instead of working with raw operators on top of this_cpu_ptr().
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/sparc/include/asm/hardirq_64.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/include/asm/hardirq_64.h b/arch/sparc/include/asm/hardirq_64.h
index 6aba904..75b92bf 100644
--- a/arch/sparc/include/asm/hardirq_64.h
+++ b/arch/sparc/include/asm/hardirq_64.h
@@ -10,8 +10,9 @@
#include <asm/cpudata.h>
#define __ARCH_IRQ_STAT
-#define local_softirq_pending() \
- (*this_cpu_ptr(&__cpu_data.__softirq_pending))
+
+#define local_softirq_pending_ref \
+ __cpu_data.__softirq_pending
void ack_bad_irq(unsigned int irq);
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 10/11] x86: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (8 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 09/11] sparc: " Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:51 ` [tip:irq/core] softirq/x86: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 11/11] softirq/s390: Move default mutators of overwritten softirq mask to s390 Frederic Weisbecker
2018-05-08 13:46 ` [GIT PULL] softirq: Consolidate and optimize softirq mask v4 Frederic Weisbecker
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
Remove the ad-hoc implementation, the generic code now allows us not to
reinvent the wheel.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/x86/include/asm/hardirq.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h
index 5ea2afd..740a428a 100644
--- a/arch/x86/include/asm/hardirq.h
+++ b/arch/x86/include/asm/hardirq.h
@@ -50,14 +50,6 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
-#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
-
-#define __ARCH_SET_SOFTIRQ_PENDING
-
-#define set_softirq_pending(x) \
- this_cpu_write(irq_stat.__softirq_pending, (x))
-#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
-
extern void ack_bad_irq(unsigned int irq);
extern u64 arch_irq_stat_cpu(unsigned int cpu);
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 11/11] softirq/s390: Move default mutators of overwritten softirq mask to s390
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (9 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 10/11] x86: " Frederic Weisbecker
@ 2018-05-08 13:38 ` Frederic Weisbecker
2018-05-14 12:52 ` [tip:irq/core] " tip-bot for Frederic Weisbecker
2018-05-08 13:46 ` [GIT PULL] softirq: Consolidate and optimize softirq mask v4 Frederic Weisbecker
11 siblings, 1 reply; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Sebastian Andrzej Siewior, Tony Luck,
Peter Zijlstra, David S . Miller, Yoshinori Sato,
Michael Ellerman, Helge Deller, Benjamin Herrenschmidt,
Paul Mackerras, Thomas Gleixner, Martin Schwidefsky, Rich Felker,
Fenghua Yu, Heiko Carstens, James E . J . Bottomley
s390 is now the last architecture that entirely overwrites
local_softirq_pending() and uses the according default definitions of
set_softirq_pending() and or_softirq_pending().
Just move these to s390 to debloat the generic code complexity.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
---
arch/s390/include/asm/hardirq.h | 2 ++
include/linux/interrupt.h | 7 -------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/s390/include/asm/hardirq.h b/arch/s390/include/asm/hardirq.h
index a296c6a..dfbc3c6c0 100644
--- a/arch/s390/include/asm/hardirq.h
+++ b/arch/s390/include/asm/hardirq.h
@@ -14,6 +14,8 @@
#include <asm/lowcore.h>
#define local_softirq_pending() (S390_lowcore.softirq_pending)
+#define set_softirq_pending(x) (S390_lowcore.softirq_pending = (x))
+#define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x))
#define __ARCH_IRQ_STAT
#define __ARCH_HAS_DO_SOFTIRQ
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 7a11f73..eeceac3 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -442,13 +442,6 @@ extern bool force_irqthreads;
#define set_softirq_pending(x) (__this_cpu_write(local_softirq_pending_ref, (x)))
#define or_softirq_pending(x) (__this_cpu_or(local_softirq_pending_ref, (x)))
-#else /* local_softirq_pending */
-
-#ifndef __ARCH_SET_SOFTIRQ_PENDING
-#define set_softirq_pending(x) (local_softirq_pending() = (x))
-#define or_softirq_pending(x) (local_softirq_pending() |= (x))
-#endif
-
#endif /* local_softirq_pending */
/* Some architectures might implement lazy enabling/disabling of
--
2.7.4
^ permalink raw reply [flat|nested] 24+ messages in thread
* [GIT PULL] softirq: Consolidate and optimize softirq mask v4
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
` (10 preceding siblings ...)
2018-05-08 13:38 ` [PATCH 11/11] softirq/s390: Move default mutators of overwritten softirq mask to s390 Frederic Weisbecker
@ 2018-05-08 13:46 ` Frederic Weisbecker
11 siblings, 0 replies; 24+ messages in thread
From: Frederic Weisbecker @ 2018-05-08 13:46 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Sebastian Andrzej Siewior, Tony Luck, Peter Zijlstra,
David S . Miller, Yoshinori Sato, Michael Ellerman, Helge Deller,
Benjamin Herrenschmidt, Paul Mackerras, Thomas Gleixner,
Martin Schwidefsky, Rich Felker, Fenghua Yu, Heiko Carstens,
James E . J . Bottomley
The actual subject is "softirq: Consolidate and optimize softirq mask v4" :-)
Sorry...
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/ia64: Convert local_softirq_pending() to per-cpu ops
2018-05-08 13:38 ` [PATCH 01/11] ia64: Convert local_softirq_pending() to per-cpu ops Frederic Weisbecker
@ 2018-05-14 12:47 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:47 UTC (permalink / raw)
To: linux-tip-commits
Cc: bigeasy, mingo, deller, heiko.carstens, jejb, paulus, benh,
frederic, dalias, peterz, tglx, schwidefsky, hpa, mpe, tony.luck,
fenghua.yu, davem, torvalds, linux-kernel, ysato
Commit-ID: 2e5c4632dcc0365a97c36817a368507e6a4c89b2
Gitweb: https://git.kernel.org/tip/2e5c4632dcc0365a97c36817a368507e6a4c89b2
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:16 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:26 +0200
softirq/ia64: Convert local_softirq_pending() to per-cpu ops
In order to consolidate and optimize generic softirq mask accesses, we
first need to convert architectures to use per-cpu operations when
possible.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-2-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/ia64/include/asm/hardirq.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h
index bdc4669c71c3..22fae710e420 100644
--- a/arch/ia64/include/asm/hardirq.h
+++ b/arch/ia64/include/asm/hardirq.h
@@ -13,7 +13,7 @@
#define __ARCH_IRQ_STAT 1
-#define local_softirq_pending() (local_cpu_data->softirq_pending)
+#define local_softirq_pending() (*this_cpu_ptr(&ia64_cpu_info.softirq_pending))
#include <linux/threads.h>
#include <linux/irq.h>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/sparc: Convert local_softirq_pending() to use per-cpu op
2018-05-08 13:38 ` [PATCH 02/11] sparc: Convert local_softirq_pending() to use per-cpu op Frederic Weisbecker
@ 2018-05-14 12:47 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:47 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, mingo, ysato, deller, jejb, heiko.carstens, mpe,
benh, torvalds, bigeasy, dalias, peterz, hpa, frederic, davem,
fenghua.yu, paulus, tony.luck, tglx, schwidefsky
Commit-ID: 49892dbc2cb349f78eccfc1f55eac0ec718f44bb
Gitweb: https://git.kernel.org/tip/49892dbc2cb349f78eccfc1f55eac0ec718f44bb
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:17 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:26 +0200
softirq/sparc: Convert local_softirq_pending() to use per-cpu op
In order to consolidate and optimize generic softirq mask accesses, we
first need to convert architectures to use per-cpu operations when
possible.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-3-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/sparc/include/asm/hardirq_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/include/asm/hardirq_64.h b/arch/sparc/include/asm/hardirq_64.h
index f56540271993..6aba904819a4 100644
--- a/arch/sparc/include/asm/hardirq_64.h
+++ b/arch/sparc/include/asm/hardirq_64.h
@@ -11,7 +11,7 @@
#define __ARCH_IRQ_STAT
#define local_softirq_pending() \
- (local_cpu_data().__softirq_pending)
+ (*this_cpu_ptr(&__cpu_data.__softirq_pending))
void ack_bad_irq(unsigned int irq);
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/sh: Use nmi_count() on /proc/interrupts print out
2018-05-08 13:38 ` [PATCH 03/11] sh: Use nmi_count() on /proc/interrupts print out Frederic Weisbecker
@ 2018-05-14 12:48 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:48 UTC (permalink / raw)
To: linux-tip-commits
Cc: mpe, torvalds, benh, frederic, dalias, deller, tony.luck, paulus,
linux-kernel, hpa, fenghua.yu, tglx, peterz, mingo, schwidefsky,
bigeasy, heiko.carstens, ysato, davem, jejb
Commit-ID: 30d723340c30ff9afe200ef5ecbbdc77e6d1f816
Gitweb: https://git.kernel.org/tip/30d723340c30ff9afe200ef5ecbbdc77e6d1f816
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:18 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:27 +0200
softirq/sh: Use nmi_count() on /proc/interrupts print out
Use nmi_count() instead of accessing directly the irq_stat structure.
Its implementation is going to change to use per-CPU, so defer the guts
to standard API instead.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-4-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/sh/kernel/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 245dbeb20afe..5717c7cbdd97 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -44,7 +44,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_printf(p, "%*s: ", prec, "NMI");
for_each_online_cpu(j)
- seq_printf(p, "%10u ", irq_stat[j].__nmi_count);
+ seq_printf(p, "%10u ", nmi_count(j));
seq_printf(p, " Non-maskable interrupts\n");
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/core: Turn default irq_cpustat_t to standard per-cpu
2018-05-08 13:38 ` [PATCH 04/11] softirq: Turn default irq_cpustat_t to standard per-cpu Frederic Weisbecker
@ 2018-05-14 12:48 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:48 UTC (permalink / raw)
To: linux-tip-commits
Cc: paulus, mpe, tglx, peterz, frederic, dalias, linux-kernel,
fenghua.yu, deller, schwidefsky, benh, davem, bigeasy, jejb,
mingo, torvalds, ysato, heiko.carstens, hpa, tony.luck
Commit-ID: 0f6f47bacba514f4e9f61de0d85940dfb41498cc
Gitweb: https://git.kernel.org/tip/0f6f47bacba514f4e9f61de0d85940dfb41498cc
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:19 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:27 +0200
softirq/core: Turn default irq_cpustat_t to standard per-cpu
In order to optimize and consolidate softirq mask accesses, let's
convert the default irq_cpustat_t implementation to per-CPU standard API.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-5-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/irq_cpustat.h | 4 ++--
kernel/softirq.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index 4954948d1973..ddea03c7c39d 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -18,8 +18,8 @@
*/
#ifndef __ARCH_IRQ_STAT
-extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
-#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
+DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */
+#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu))
#endif
/* arch independent irq_stat fields */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 177de3640c78..c5fafd792df1 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -49,8 +49,8 @@
*/
#ifndef __ARCH_IRQ_STAT
-irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
-EXPORT_SYMBOL(irq_stat);
+DEFINE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat);
+EXPORT_PER_CPU_SYMBOL(irq_stat);
#endif
static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp;
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/core: Consolidate default local_softirq_pending() implementations
2018-05-08 13:38 ` [PATCH 05/11] softirq: Consolidate default local_softirq_pending() implementations Frederic Weisbecker
@ 2018-05-14 12:49 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:49 UTC (permalink / raw)
To: linux-tip-commits
Cc: frederic, benh, deller, ysato, peterz, torvalds, fenghua.yu,
tony.luck, mpe, heiko.carstens, mingo, davem, jejb, linux-kernel,
hpa, schwidefsky, paulus, dalias, tglx, bigeasy
Commit-ID: 0fd7d86285290ccebc0dc6eb536b6b043dd6a1e4
Gitweb: https://git.kernel.org/tip/0fd7d86285290ccebc0dc6eb536b6b043dd6a1e4
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:20 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:27 +0200
softirq/core: Consolidate default local_softirq_pending() implementations
Consolidate and optimize default softirq mask API implementations.
Per-CPU operations are expected to be faster and a few architectures
already rely on them to implement local_softirq_pending() and related
accessors/mutators. Those will be migrated to the new generic code.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-6-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/interrupt.h | 14 ++++++++++++++
include/linux/irq_cpustat.h | 6 +-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5426627f9c55..7a11f73c5c3b 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -432,11 +432,25 @@ extern bool force_irqthreads;
#define force_irqthreads (0)
#endif
+#ifndef local_softirq_pending
+
+#ifndef local_softirq_pending_ref
+#define local_softirq_pending_ref irq_stat.__softirq_pending
+#endif
+
+#define local_softirq_pending() (__this_cpu_read(local_softirq_pending_ref))
+#define set_softirq_pending(x) (__this_cpu_write(local_softirq_pending_ref, (x)))
+#define or_softirq_pending(x) (__this_cpu_or(local_softirq_pending_ref, (x)))
+
+#else /* local_softirq_pending */
+
#ifndef __ARCH_SET_SOFTIRQ_PENDING
#define set_softirq_pending(x) (local_softirq_pending() = (x))
#define or_softirq_pending(x) (local_softirq_pending() |= (x))
#endif
+#endif /* local_softirq_pending */
+
/* Some architectures might implement lazy enabling/disabling of
* interrupts. In some cases, such as stop_machine, we might want
* to ensure that after a local_irq_disable(), interrupts have
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index ddea03c7c39d..6e8895cd4d92 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -22,11 +22,7 @@ DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */
#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu))
#endif
- /* arch independent irq_stat fields */
-#define local_softirq_pending() \
- __IRQ_STAT(smp_processor_id(), __softirq_pending)
-
- /* arch dependent irq_stat fields */
+/* arch dependent irq_stat fields */
#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) /* i386 */
#endif /* __irq_cpustat_h */
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/ia64: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 ` [PATCH 06/11] ia64: Switch to generic local_softirq_pending() implementation Frederic Weisbecker
@ 2018-05-14 12:49 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:49 UTC (permalink / raw)
To: linux-tip-commits
Cc: davem, linux-kernel, peterz, paulus, fenghua.yu, deller, ysato,
tglx, mingo, dalias, bigeasy, mpe, torvalds, tony.luck, jejb,
heiko.carstens, schwidefsky, hpa, benh, frederic
Commit-ID: a58bdf25b98bf765b4b732f2c56097ddcb9f2d5a
Gitweb: https://git.kernel.org/tip/a58bdf25b98bf765b4b732f2c56097ddcb9f2d5a
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:21 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:27 +0200
softirq/ia64: Switch to generic local_softirq_pending() implementation
Benefit from the generic softirq mask implementation that rely on per-CPU
mutators instead of working with raw operators on top of this_cpu_ptr().
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-7-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/ia64/include/asm/hardirq.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/hardirq.h b/arch/ia64/include/asm/hardirq.h
index 22fae710e420..ccde7c2ba00f 100644
--- a/arch/ia64/include/asm/hardirq.h
+++ b/arch/ia64/include/asm/hardirq.h
@@ -13,7 +13,7 @@
#define __ARCH_IRQ_STAT 1
-#define local_softirq_pending() (*this_cpu_ptr(&ia64_cpu_info.softirq_pending))
+#define local_softirq_pending_ref ia64_cpu_info.softirq_pending
#include <linux/threads.h>
#include <linux/irq.h>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/parisc: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 ` [PATCH 07/11] parisc: " Frederic Weisbecker
@ 2018-05-14 12:50 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:50 UTC (permalink / raw)
To: linux-tip-commits
Cc: bigeasy, schwidefsky, dalias, linux-kernel, torvalds, paulus,
hpa, tony.luck, benh, deller, mpe, davem, peterz, tglx, jejb,
heiko.carstens, fenghua.yu, ysato, frederic, mingo
Commit-ID: 03979f8a72e6576248e7b9e3abb72a760312dd7d
Gitweb: https://git.kernel.org/tip/03979f8a72e6576248e7b9e3abb72a760312dd7d
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:22 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:27 +0200
softirq/parisc: Switch to generic local_softirq_pending() implementation
Remove the ad-hoc implementation, the generic code now allows us not to
reinvent the wheel.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-8-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/parisc/include/asm/hardirq.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/parisc/include/asm/hardirq.h b/arch/parisc/include/asm/hardirq.h
index 077815169258..1a1235a9d533 100644
--- a/arch/parisc/include/asm/hardirq.h
+++ b/arch/parisc/include/asm/hardirq.h
@@ -34,14 +34,6 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
#define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member)
-#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
-
-#define __ARCH_SET_SOFTIRQ_PENDING
-
-#define set_softirq_pending(x) \
- this_cpu_write(irq_stat.__softirq_pending, (x))
-#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
-
#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
#endif /* _PARISC_HARDIRQ_H */
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/powerpc: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 ` [PATCH 08/11] powerpc: " Frederic Weisbecker
@ 2018-05-14 12:50 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:50 UTC (permalink / raw)
To: linux-tip-commits
Cc: davem, jejb, ysato, heiko.carstens, paulus, mpe, schwidefsky,
hpa, peterz, linux-kernel, mingo, deller, fenghua.yu, tony.luck,
dalias, bigeasy, tglx, benh, frederic, torvalds
Commit-ID: 1321a5de1ecb0d2981394ff2111c75c4dcb0c237
Gitweb: https://git.kernel.org/tip/1321a5de1ecb0d2981394ff2111c75c4dcb0c237
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:23 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:28 +0200
softirq/powerpc: Switch to generic local_softirq_pending() implementation
Remove the ad-hoc implementation, the generic code now allows us not to
reinvent the wheel.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-9-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/powerpc/include/asm/hardirq.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h
index 5986d473722b..383f628acbf8 100644
--- a/arch/powerpc/include/asm/hardirq.h
+++ b/arch/powerpc/include/asm/hardirq.h
@@ -25,15 +25,8 @@ typedef struct {
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
#define __ARCH_IRQ_STAT
-
-#define local_softirq_pending() __this_cpu_read(irq_stat.__softirq_pending)
-
-#define __ARCH_SET_SOFTIRQ_PENDING
#define __ARCH_IRQ_EXIT_IRQS_DISABLED
-#define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x))
-#define or_softirq_pending(x) __this_cpu_or(irq_stat.__softirq_pending, (x))
-
static inline void ack_bad_irq(unsigned int irq)
{
printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/sparc: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 ` [PATCH 09/11] sparc: " Frederic Weisbecker
@ 2018-05-14 12:51 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:51 UTC (permalink / raw)
To: linux-tip-commits
Cc: tony.luck, tglx, dalias, bigeasy, mingo, deller, hpa, ysato,
heiko.carstens, paulus, benh, fenghua.yu, davem, linux-kernel,
jejb, schwidefsky, frederic, torvalds, peterz, mpe
Commit-ID: 424f7d3e3b950c88a4127b7dfa78ea54e287413e
Gitweb: https://git.kernel.org/tip/424f7d3e3b950c88a4127b7dfa78ea54e287413e
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:24 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:28 +0200
softirq/sparc: Switch to generic local_softirq_pending() implementation
Benefit from the generic softirq mask implementation that rely on per-CPU
mutators instead of working with raw operators on top of this_cpu_ptr().
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-10-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/sparc/include/asm/hardirq_64.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/include/asm/hardirq_64.h b/arch/sparc/include/asm/hardirq_64.h
index 6aba904819a4..75b92bfe04b5 100644
--- a/arch/sparc/include/asm/hardirq_64.h
+++ b/arch/sparc/include/asm/hardirq_64.h
@@ -10,8 +10,9 @@
#include <asm/cpudata.h>
#define __ARCH_IRQ_STAT
-#define local_softirq_pending() \
- (*this_cpu_ptr(&__cpu_data.__softirq_pending))
+
+#define local_softirq_pending_ref \
+ __cpu_data.__softirq_pending
void ack_bad_irq(unsigned int irq);
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/x86: Switch to generic local_softirq_pending() implementation
2018-05-08 13:38 ` [PATCH 10/11] x86: " Frederic Weisbecker
@ 2018-05-14 12:51 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:51 UTC (permalink / raw)
To: linux-tip-commits
Cc: schwidefsky, fenghua.yu, mingo, heiko.carstens, tglx, tony.luck,
paulus, jejb, bigeasy, deller, dalias, mpe, torvalds, davem,
linux-kernel, benh, hpa, peterz, frederic, ysato
Commit-ID: 1a8bc8f8d6a7980a999975edbd29578fbce09359
Gitweb: https://git.kernel.org/tip/1a8bc8f8d6a7980a999975edbd29578fbce09359
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:25 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:28 +0200
softirq/x86: Switch to generic local_softirq_pending() implementation
Remove the ad-hoc implementation, the generic code now allows us not to
reinvent the wheel.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-11-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/hardirq.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h
index 5ea2afd4c871..740a428acf1e 100644
--- a/arch/x86/include/asm/hardirq.h
+++ b/arch/x86/include/asm/hardirq.h
@@ -50,14 +50,6 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
-#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
-
-#define __ARCH_SET_SOFTIRQ_PENDING
-
-#define set_softirq_pending(x) \
- this_cpu_write(irq_stat.__softirq_pending, (x))
-#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
-
extern void ack_bad_irq(unsigned int irq);
extern u64 arch_irq_stat_cpu(unsigned int cpu);
^ permalink raw reply [flat|nested] 24+ messages in thread
* [tip:irq/core] softirq/s390: Move default mutators of overwritten softirq mask to s390
2018-05-08 13:38 ` [PATCH 11/11] softirq/s390: Move default mutators of overwritten softirq mask to s390 Frederic Weisbecker
@ 2018-05-14 12:52 ` tip-bot for Frederic Weisbecker
0 siblings, 0 replies; 24+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2018-05-14 12:52 UTC (permalink / raw)
To: linux-tip-commits
Cc: mpe, jejb, torvalds, ysato, fenghua.yu, benh, mingo, tony.luck,
heiko.carstens, paulus, linux-kernel, schwidefsky, bigeasy, hpa,
dalias, frederic, deller, tglx, peterz, davem
Commit-ID: 48bda43eabb8d086204f543cf8bbad696b8c6391
Gitweb: https://git.kernel.org/tip/48bda43eabb8d086204f543cf8bbad696b8c6391
Author: Frederic Weisbecker <frederic@kernel.org>
AuthorDate: Tue, 8 May 2018 15:38:26 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 14 May 2018 11:25:28 +0200
softirq/s390: Move default mutators of overwritten softirq mask to s390
s390 is now the last architecture that entirely overwrites
local_softirq_pending() and uses the according default definitions of
set_softirq_pending() and or_softirq_pending().
Just move these to s390 to debloat the generic code complexity.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-12-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/s390/include/asm/hardirq.h | 2 ++
include/linux/interrupt.h | 7 -------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/s390/include/asm/hardirq.h b/arch/s390/include/asm/hardirq.h
index a296c6acfd07..dfbc3c6c0674 100644
--- a/arch/s390/include/asm/hardirq.h
+++ b/arch/s390/include/asm/hardirq.h
@@ -14,6 +14,8 @@
#include <asm/lowcore.h>
#define local_softirq_pending() (S390_lowcore.softirq_pending)
+#define set_softirq_pending(x) (S390_lowcore.softirq_pending = (x))
+#define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x))
#define __ARCH_IRQ_STAT
#define __ARCH_HAS_DO_SOFTIRQ
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 7a11f73c5c3b..eeceac3376fc 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -442,13 +442,6 @@ extern bool force_irqthreads;
#define set_softirq_pending(x) (__this_cpu_write(local_softirq_pending_ref, (x)))
#define or_softirq_pending(x) (__this_cpu_or(local_softirq_pending_ref, (x)))
-#else /* local_softirq_pending */
-
-#ifndef __ARCH_SET_SOFTIRQ_PENDING
-#define set_softirq_pending(x) (local_softirq_pending() = (x))
-#define or_softirq_pending(x) (local_softirq_pending() |= (x))
-#endif
-
#endif /* local_softirq_pending */
/* Some architectures might implement lazy enabling/disabling of
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2018-05-14 12:54 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 13:38 [GIT PULL] Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 01/11] ia64: Convert local_softirq_pending() to per-cpu ops Frederic Weisbecker
2018-05-14 12:47 ` [tip:irq/core] softirq/ia64: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 02/11] sparc: Convert local_softirq_pending() to use per-cpu op Frederic Weisbecker
2018-05-14 12:47 ` [tip:irq/core] softirq/sparc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 03/11] sh: Use nmi_count() on /proc/interrupts print out Frederic Weisbecker
2018-05-14 12:48 ` [tip:irq/core] softirq/sh: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 04/11] softirq: Turn default irq_cpustat_t to standard per-cpu Frederic Weisbecker
2018-05-14 12:48 ` [tip:irq/core] softirq/core: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 05/11] softirq: Consolidate default local_softirq_pending() implementations Frederic Weisbecker
2018-05-14 12:49 ` [tip:irq/core] softirq/core: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 06/11] ia64: Switch to generic local_softirq_pending() implementation Frederic Weisbecker
2018-05-14 12:49 ` [tip:irq/core] softirq/ia64: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 07/11] parisc: " Frederic Weisbecker
2018-05-14 12:50 ` [tip:irq/core] softirq/parisc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 08/11] powerpc: " Frederic Weisbecker
2018-05-14 12:50 ` [tip:irq/core] softirq/powerpc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 09/11] sparc: " Frederic Weisbecker
2018-05-14 12:51 ` [tip:irq/core] softirq/sparc: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 10/11] x86: " Frederic Weisbecker
2018-05-14 12:51 ` [tip:irq/core] softirq/x86: " tip-bot for Frederic Weisbecker
2018-05-08 13:38 ` [PATCH 11/11] softirq/s390: Move default mutators of overwritten softirq mask to s390 Frederic Weisbecker
2018-05-14 12:52 ` [tip:irq/core] " tip-bot for Frederic Weisbecker
2018-05-08 13:46 ` [GIT PULL] softirq: Consolidate and optimize softirq mask v4 Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).