History

softirq: Move __ARCH_HAS_DO_SOFTIRQ to Kconfig

To prepare for inlining do_softirq_own_stack() replace __ARCH_HAS_DO_SOFTIRQ with a Kconfig switch and select it in the affected architectures. This allows in the next step to move the function prototype and the inline stub into a seperate asm-generic header file which is required to avoid include recursion.

Thomas Gleixner committed 5 years ago

Commit cd1a41c1 parent 624db9e14 files · +13 −12Browse files

Unified · Split

14 files
  1. arch/Kconfig +6 −0
  2. arch/parisc/Kconfig +1 −0
  3. arch/parisc/include/asm/hardirq.h +0 −4
  4. arch/powerpc/Kconfig +1 −0
  5. arch/powerpc/include/asm/irq.h +0 −2
  6. arch/s390/Kconfig +1 −0
  7. arch/s390/include/asm/hardirq.h +0 −1
  8. arch/sh/Kconfig +1 −0
  9. arch/sh/include/asm/irq.h +0 −1
  10. arch/sparc/Kconfig +1 −0
  11. arch/sparc/include/asm/irq_64.h +0 −1
  12. arch/x86/Kconfig +1 −0
  13. arch/x86/include/asm/irq.h +0 −2
  14. include/linux/interrupt.h +1 −1
arch/Kconfig+6−0
@@ -759,6 +759,12 @@ config HAVE_IRQ_EXIT_ON_IRQ_STACK · 758 unmodified lines
759759 This spares a stack switch and improves cache usage on softirq
760760 processing.
761761
762+config HAVE_SOFTIRQ_ON_OWN_STACK
763+ bool
764+ help
765+ Architecture provides a function to run __do_softirq() on a
766+ seperate stack.
767+
762768 config PGTABLE_LEVELS
763769 int
764770 default 2
arch/parisc/Kconfig+1−0
@@ -63,6 +63,7 @@ config PARISC · 62 unmodified lines
6363 select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
6464 select HAVE_KPROBES_ON_FTRACE
6565 select HAVE_DYNAMIC_FTRACE_WITH_REGS
66+ select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
6667 select SET_FS
6768
6869 help
arch/parisc/include/asm/hardirq.h+0−4
@@ -12,10 +12,6 @@ · 11 unmodified lines
1212 #include <linux/threads.h>
1313 #include <linux/irq.h>
1414
15−#ifdef CONFIG_IRQSTACKS
16−#define __ARCH_HAS_DO_SOFTIRQ
17−#endif
18−
1915 typedef struct {
2016 unsigned int __softirq_pending;
2117 unsigned int kernel_stack_usage;
arch/powerpc/Kconfig+1−0
@@ -237,6 +237,7 @@ config PPC · 236 unmodified lines
237237 select MMU_GATHER_PAGE_SIZE
238238 select HAVE_REGS_AND_STACK_ACCESS_API
239239 select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
240+ select HAVE_SOFTIRQ_ON_OWN_STACK
240241 select HAVE_SYSCALL_TRACEPOINTS
241242 select HAVE_VIRT_CPU_ACCOUNTING
242243 select HAVE_IRQ_TIME_ACCOUNTING
arch/powerpc/include/asm/irq.h+0−2
@@ -37,8 +37,6 @@ extern int distribute_irqs; · 36 unmodified lines
3737
3838 struct pt_regs;
3939
40−#define __ARCH_HAS_DO_SOFTIRQ
41−
4240 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
4341 /*
4442 * Per-cpu stacks for handling critical, debug and machine check
arch/s390/Kconfig+1−0
@@ -182,6 +182,7 @@ config S390 · 181 unmodified lines
182182 select HAVE_REGS_AND_STACK_ACCESS_API
183183 select HAVE_RELIABLE_STACKTRACE
184184 select HAVE_RSEQ
185+ select HAVE_SOFTIRQ_ON_OWN_STACK
185186 select HAVE_SYSCALL_TRACEPOINTS
186187 select HAVE_VIRT_CPU_ACCOUNTING
187188 select HAVE_VIRT_CPU_ACCOUNTING_IDLE
arch/s390/include/asm/hardirq.h+0−1
@@ -18,7 +18,6 @@ · 17 unmodified lines
1818 #define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x))
1919
2020 #define __ARCH_IRQ_STAT
21−#define __ARCH_HAS_DO_SOFTIRQ
2221 #define __ARCH_IRQ_EXIT_IRQS_DISABLED
2322
2423 static inline void ack_bad_irq(unsigned int irq)
arch/sh/Kconfig+1−0
@@ -56,6 +56,7 @@ config SUPERH · 55 unmodified lines
5656 select HAVE_PERF_EVENTS
5757 select HAVE_REGS_AND_STACK_ACCESS_API
5858 select HAVE_UID16
59+ select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
5960 select HAVE_STACKPROTECTOR
6061 select HAVE_SYSCALL_TRACEPOINTS
6162 select IRQ_FORCED_THREADING
arch/sh/include/asm/irq.h+0−1
@@ -51,7 +51,6 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs); · 50 unmodified lines
5151 #ifdef CONFIG_IRQSTACKS
5252 extern void irq_ctx_init(int cpu);
5353 extern void irq_ctx_exit(int cpu);
54−# define __ARCH_HAS_DO_SOFTIRQ
5554 #else
5655 # define irq_ctx_init(cpu) do { } while (0)
5756 # define irq_ctx_exit(cpu) do { } while (0)
arch/sparc/Kconfig+1−0
@@ -97,6 +97,7 @@ config SPARC64 · 96 unmodified lines
9797 select ARCH_HAS_PTE_SPECIAL
9898 select PCI_DOMAINS if PCI
9999 select ARCH_HAS_GIGANTIC_PAGE
100+ select HAVE_SOFTIRQ_ON_OWN_STACK
100101
101102 config ARCH_PROC_KCORE_TEXT
102103 def_bool y
arch/sparc/include/asm/irq_64.h+0−1
@@ -93,7 +93,6 @@ void arch_trigger_cpumask_backtrace(const struct cpumask *mask, · 92 unmodified lines
9393
9494 extern void *hardirq_stack[NR_CPUS];
9595 extern void *softirq_stack[NR_CPUS];
96−#define __ARCH_HAS_DO_SOFTIRQ
9796
9897 #define NO_IRQ 0xffffffff
9998
arch/x86/Kconfig+1−0
@@ -221,6 +221,7 @@ config X86 · 220 unmodified lines
221221 select HAVE_REGS_AND_STACK_ACCESS_API
222222 select HAVE_RELIABLE_STACKTRACE if X86_64 && (UNWINDER_FRAME_POINTER || UNWINDER_ORC) && STACK_VALIDATION
223223 select HAVE_FUNCTION_ARG_ACCESS_API
224+ select HAVE_SOFTIRQ_ON_OWN_STACK
224225 select HAVE_STACKPROTECTOR if CC_HAS_SANE_STACKPROTECTOR
225226 select HAVE_STACK_VALIDATION if X86_64
226227 select HAVE_STATIC_CALL
arch/x86/include/asm/irq.h+0−2
@@ -25,8 +25,6 @@ static inline int irq_canonicalize(int irq) · 24 unmodified lines
2525
2626 extern int irq_init_percpu_irqstack(unsigned int cpu);
2727
28−#define __ARCH_HAS_DO_SOFTIRQ
29−
3028 struct irq_desc;
3129
3230 extern void fixup_irqs(void);
include/linux/interrupt.h+1−1
@@ -569,7 +569,7 @@ struct softirq_action · 568 unmodified lines
569569 asmlinkage void do_softirq(void);
570570 asmlinkage void __do_softirq(void);
571571
572−#ifdef __ARCH_HAS_DO_SOFTIRQ
572+#ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK
573573 void do_softirq_own_stack(void);
574574 #else
575575 static inline void do_softirq_own_stack(void)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t