Skip to contentSkip to conversation

[GIT PULL]

GIT PULL New Frederic Weisbecker 2 participants 24 messages May 8, 2018 – May 14, 2018

Subsystems (6)
x86 PowerPC s390 SuperH +2 more subsystems
lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

PATCH 1/11 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.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/ia64/include/asm/hardirq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/hardirq.h +1 -1
index bdc4669..22fae71 100644
@@ -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>
Signature · 1 line
2.7.4
#2 lore raw

[tip:irq/core] softirq/ia64: Convert local_softirq_pending() to per-cpu ops

softirq/ia64: Convert local_softirq_pending() to per-cpu ops
Commit-ID:  2e5c4632dcc0365a97c36817a368507e6a4c89b2
Gitweb:     https://git.kernel.org/tip/2e5c4632dcc0365a97c36817a368507e6a4c89b2
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:16 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/ia64/include/asm/hardirq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/hardirq.h +1 -1
index bdc4669c71c3..22fae710e420 100644
@@ -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>
#3 lore raw

PATCH 2/11 sparc: Convert local_softirq_pending() to use per-cpu op

In reply to Frederic Weisbecker

In order to consolidate and optimize generic softirq mask accesses, we first need to convert architectures to use per-cpu operations when possible.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sparc/include/asm/hardirq_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/include/asm/hardirq_64.h +1 -1
index f565402..6aba904 100644
@@ -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);
 
Signature · 1 line
2.7.4
#4 lore raw

[tip:irq/core] softirq/sparc: Convert local_softirq_pending() to use per-cpu op

softirq/sparc: Convert local_softirq_pending() to use per-cpu op
Commit-ID:  49892dbc2cb349f78eccfc1f55eac0ec718f44bb
Gitweb:     https://git.kernel.org/tip/49892dbc2cb349f78eccfc1f55eac0ec718f44bb
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:17 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/sparc/include/asm/hardirq_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/include/asm/hardirq_64.h +1 -1
index f56540271993..6aba904819a4 100644
@@ -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);
 
#5 lore raw

PATCH 3/11 sh: Use nmi_count() on /proc/interrupts print out

In reply to Frederic Weisbecker

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.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sh/kernel/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/kernel/irq.c +1 -1
index 245dbeb..5717c7c 100644
@@ -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));
Signature · 1 line
2.7.4
#6 lore raw

[tip:irq/core] softirq/sh: Use nmi_count() on /proc/interrupts print out

softirq/sh: Use nmi_count() on /proc/interrupts print out
Commit-ID:  30d723340c30ff9afe200ef5ecbbdc77e6d1f816
Gitweb:     https://git.kernel.org/tip/30d723340c30ff9afe200ef5ecbbdc77e6d1f816
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:18 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/sh/kernel/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/kernel/irq.c +1 -1
index 245dbeb20afe..5717c7cbdd97 100644
@@ -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));
#7 lore raw

PATCH 4/11 softirq: Turn default irq_cpustat_t to standard per-cpu

In reply to Frederic Weisbecker

In order to optimize and consolidate softirq mask accesses, let's convert the default irq_cpustat_t implementation to per-CPU standard API.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 include/linux/irq_cpustat.h | 4 ++--
 kernel/softirq.c            | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
include/linux/irq_cpustat.h +2 -2
index 4954948..ddea03c 100644
@@ -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 */
kernel/softirq.c +2 -2
index 177de36..c5fafd7 100644
@@ -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;
Signature · 1 line
2.7.4
#8 lore raw

[tip:irq/core] softirq/core: Turn default irq_cpustat_t to standard per-cpu

softirq/core: Turn default irq_cpustat_t to standard per-cpu
Commit-ID:  0f6f47bacba514f4e9f61de0d85940dfb41498cc
Gitweb:     https://git.kernel.org/tip/0f6f47bacba514f4e9f61de0d85940dfb41498cc
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:19 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 include/linux/irq_cpustat.h | 4 ++--
 kernel/softirq.c            | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
include/linux/irq_cpustat.h +2 -2
index 4954948d1973..ddea03c7c39d 100644
@@ -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 */
kernel/softirq.c +2 -2
index 177de3640c78..c5fafd792df1 100644
@@ -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;
#9 lore raw

PATCH 5/11 softirq: Consolidate default local_softirq_pending() implementations

In reply to Frederic Weisbecker

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.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 include/linux/interrupt.h   | 14 ++++++++++++++
 include/linux/irq_cpustat.h |  6 +-----
 2 files changed, 15 insertions(+), 5 deletions(-)
include/linux/interrupt.h +14 -0
index 5426627..7a11f73 100644
@@ -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
include/linux/irq_cpustat.h +1 -5
index ddea03c..6e8895c 100644
@@ -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 */
Signature · 1 line
2.7.4
#10 lore raw

[tip:irq/core] softirq/core: Consolidate default local_softirq_pending() implementations

softirq/core: Consolidate default local_softirq_pending() implementations
Commit-ID:  0fd7d86285290ccebc0dc6eb536b6b043dd6a1e4
Gitweb:     https://git.kernel.org/tip/0fd7d86285290ccebc0dc6eb536b6b043dd6a1e4
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:20 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 include/linux/interrupt.h   | 14 ++++++++++++++
 include/linux/irq_cpustat.h |  6 +-----
 2 files changed, 15 insertions(+), 5 deletions(-)
include/linux/interrupt.h +14 -0
index 5426627f9c55..7a11f73c5c3b 100644
@@ -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
include/linux/irq_cpustat.h +1 -5
index ddea03c7c39d..6e8895cd4d92 100644
@@ -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 */
#11 lore raw

PATCH 6/11 ia64: Switch to generic local_softirq_pending() implementation

In reply to Frederic Weisbecker

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().

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/ia64/include/asm/hardirq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/hardirq.h +1 -1
index 22fae71..ccde7c2 100644
@@ -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>
Signature · 1 line
2.7.4
#12 lore raw

[tip:irq/core] softirq/ia64: Switch to generic local_softirq_pending() implementation

softirq/ia64: Switch to generic local_softirq_pending() implementation
Commit-ID:  a58bdf25b98bf765b4b732f2c56097ddcb9f2d5a
Gitweb:     https://git.kernel.org/tip/a58bdf25b98bf765b4b732f2c56097ddcb9f2d5a
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:21 +0200
Committer:  Ingo Molnar <[email protected]>
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().

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/ia64/include/asm/hardirq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/hardirq.h +1 -1
index 22fae710e420..ccde7c2ba00f 100644
@@ -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>
#13 lore raw

PATCH 7/11 parisc: Switch to generic local_softirq_pending() implementation

In reply to Frederic Weisbecker

Remove the ad-hoc implementation, the generic code now allows us not to reinvent the wheel.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/parisc/include/asm/hardirq.h | 8 --------
 1 file changed, 8 deletions(-)
arch/parisc/include/asm/hardirq.h +0 -8
index 0778151..1a1235a 100644
@@ -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 */
Signature · 1 line
2.7.4
#14 lore raw

[tip:irq/core] softirq/parisc: Switch to generic local_softirq_pending() implementation

softirq/parisc: Switch to generic local_softirq_pending() implementation
Commit-ID:  03979f8a72e6576248e7b9e3abb72a760312dd7d
Gitweb:     https://git.kernel.org/tip/03979f8a72e6576248e7b9e3abb72a760312dd7d
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:22 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/parisc/include/asm/hardirq.h | 8 --------
 1 file changed, 8 deletions(-)
arch/parisc/include/asm/hardirq.h +0 -8
index 077815169258..1a1235a9d533 100644
@@ -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 */
#15 lore raw

PATCH 8/11 powerpc: Switch to generic local_softirq_pending() implementation

In reply to Frederic Weisbecker

Remove the ad-hoc implementation, the generic code now allows us not to reinvent the wheel.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/powerpc/include/asm/hardirq.h | 7 -------
 1 file changed, 7 deletions(-)
arch/powerpc/include/asm/hardirq.h +0 -7
index 5986d47..383f628 100644
@@ -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);
Signature · 1 line
2.7.4
#16 lore raw

[tip:irq/core] softirq/powerpc: Switch to generic local_softirq_pending() implementation

softirq/powerpc: Switch to generic local_softirq_pending() implementation
Commit-ID:  1321a5de1ecb0d2981394ff2111c75c4dcb0c237
Gitweb:     https://git.kernel.org/tip/1321a5de1ecb0d2981394ff2111c75c4dcb0c237
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:23 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/powerpc/include/asm/hardirq.h | 7 -------
 1 file changed, 7 deletions(-)
arch/powerpc/include/asm/hardirq.h +0 -7
index 5986d473722b..383f628acbf8 100644
@@ -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);
#17 lore raw

PATCH 9/11 sparc: Switch to generic local_softirq_pending() implementation

In reply to Frederic Weisbecker

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().

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/sparc/include/asm/hardirq_64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/sparc/include/asm/hardirq_64.h +3 -2
index 6aba904..75b92bf 100644
@@ -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);
 
Signature · 1 line
2.7.4
#18 lore raw

[tip:irq/core] softirq/sparc: Switch to generic local_softirq_pending() implementation

softirq/sparc: Switch to generic local_softirq_pending() implementation
Commit-ID:  424f7d3e3b950c88a4127b7dfa78ea54e287413e
Gitweb:     https://git.kernel.org/tip/424f7d3e3b950c88a4127b7dfa78ea54e287413e
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:24 +0200
Committer:  Ingo Molnar <[email protected]>
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().

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/sparc/include/asm/hardirq_64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/sparc/include/asm/hardirq_64.h +3 -2
index 6aba904819a4..75b92bfe04b5 100644
@@ -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);
 
#19 lore raw

PATCH 10/11 x86: Switch to generic local_softirq_pending() implementation

In reply to Frederic Weisbecker

Remove the ad-hoc implementation, the generic code now allows us not to reinvent the wheel.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/x86/include/asm/hardirq.h | 8 --------
 1 file changed, 8 deletions(-)
arch/x86/include/asm/hardirq.h +0 -8
index 5ea2afd..740a428a 100644
@@ -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);
Signature · 1 line
2.7.4
#20 lore raw

[tip:irq/core] softirq/x86: Switch to generic local_softirq_pending() implementation

softirq/x86: Switch to generic local_softirq_pending() implementation
Commit-ID:  1a8bc8f8d6a7980a999975edbd29578fbce09359
Gitweb:     https://git.kernel.org/tip/1a8bc8f8d6a7980a999975edbd29578fbce09359
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:25 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/x86/include/asm/hardirq.h | 8 --------
 1 file changed, 8 deletions(-)
arch/x86/include/asm/hardirq.h +0 -8
index 5ea2afd4c871..740a428acf1e 100644
@@ -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);
#21 lore raw

PATCH 11/11 softirq/s390: Move default mutators of overwritten softirq mask to s390

In reply to Frederic Weisbecker

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.

Cc Thomas Gleixner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc David S. Miller <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
---
 arch/s390/include/asm/hardirq.h | 2 ++
 include/linux/interrupt.h       | 7 -------
 2 files changed, 2 insertions(+), 7 deletions(-)
arch/s390/include/asm/hardirq.h +2 -0
index a296c6a..dfbc3c6c0 100644
@@ -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
include/linux/interrupt.h +0 -7
index 7a11f73..eeceac3 100644
@@ -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
Signature · 1 line
2.7.4
#22 lore raw

[tip:irq/core] softirq/s390: Move default mutators of overwritten softirq mask to s390

softirq/s390: Move default mutators of overwritten softirq mask to s390
Commit-ID:  48bda43eabb8d086204f543cf8bbad696b8c6391
Gitweb:     https://git.kernel.org/tip/48bda43eabb8d086204f543cf8bbad696b8c6391
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Tue, 8 May 2018 15:38:26 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Benjamin Herrenschmidt <[email protected]>
Cc David S. Miller <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Rich Felker <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Tony Luck <[email protected]>
Cc Yoshinori Sato <[email protected]>
---
 arch/s390/include/asm/hardirq.h | 2 ++
 include/linux/interrupt.h       | 7 -------
 2 files changed, 2 insertions(+), 7 deletions(-)
arch/s390/include/asm/hardirq.h +2 -0
index a296c6acfd07..dfbc3c6c0674 100644
@@ -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
include/linux/interrupt.h +0 -7
index 7a11f73c5c3b..eeceac3376fc 100644
@@ -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