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
759 This spares a stack switch and improves cache usage on softirq759 This spares a stack switch and improves cache usage on softirq
760 processing.760 processing.
761 761
762config HAVE_SOFTIRQ_ON_OWN_STACK
763 bool
764 help
765 Architecture provides a function to run __do_softirq() on a
766 seperate stack.
767
762config PGTABLE_LEVELS768config PGTABLE_LEVELS
763 int769 int
764 default 2770 default 2
arch/parisc/Kconfig+1−0
@@ -63,6 +63,7 @@ config PARISC · 62 unmodified lines
63 select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE63 select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
64 select HAVE_KPROBES_ON_FTRACE64 select HAVE_KPROBES_ON_FTRACE
65 select HAVE_DYNAMIC_FTRACE_WITH_REGS65 select HAVE_DYNAMIC_FTRACE_WITH_REGS
66 select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
66 select SET_FS67 select SET_FS
67 68
68 help69 help
arch/parisc/include/asm/hardirq.h+0−4
@@ -12,10 +12,6 @@ · 11 unmodified lines
12#include <linux/threads.h>12#include <linux/threads.h>
13#include <linux/irq.h>13#include <linux/irq.h>
14 14
15#ifdef CONFIG_IRQSTACKS
16#define __ARCH_HAS_DO_SOFTIRQ
17#endif
18
19typedef struct {15typedef struct {
20 unsigned int __softirq_pending;16 unsigned int __softirq_pending;
21 unsigned int kernel_stack_usage;17 unsigned int kernel_stack_usage;
arch/powerpc/Kconfig+1−0
@@ -237,6 +237,7 @@ config PPC · 236 unmodified lines
237 select MMU_GATHER_PAGE_SIZE237 select MMU_GATHER_PAGE_SIZE
238 select HAVE_REGS_AND_STACK_ACCESS_API238 select HAVE_REGS_AND_STACK_ACCESS_API
239 select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN239 select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
240 select HAVE_SOFTIRQ_ON_OWN_STACK
240 select HAVE_SYSCALL_TRACEPOINTS241 select HAVE_SYSCALL_TRACEPOINTS
241 select HAVE_VIRT_CPU_ACCOUNTING242 select HAVE_VIRT_CPU_ACCOUNTING
242 select HAVE_IRQ_TIME_ACCOUNTING243 select HAVE_IRQ_TIME_ACCOUNTING
arch/powerpc/include/asm/irq.h+0−2
@@ -37,8 +37,6 @@ extern int distribute_irqs; · 36 unmodified lines
37 37
38struct pt_regs;38struct pt_regs;
39 39
40#define __ARCH_HAS_DO_SOFTIRQ
41
42#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)40#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
43/*41/*
44 * Per-cpu stacks for handling critical, debug and machine check42 * Per-cpu stacks for handling critical, debug and machine check
arch/s390/Kconfig+1−0
@@ -182,6 +182,7 @@ config S390 · 181 unmodified lines
182 select HAVE_REGS_AND_STACK_ACCESS_API182 select HAVE_REGS_AND_STACK_ACCESS_API
183 select HAVE_RELIABLE_STACKTRACE183 select HAVE_RELIABLE_STACKTRACE
184 select HAVE_RSEQ184 select HAVE_RSEQ
185 select HAVE_SOFTIRQ_ON_OWN_STACK
185 select HAVE_SYSCALL_TRACEPOINTS186 select HAVE_SYSCALL_TRACEPOINTS
186 select HAVE_VIRT_CPU_ACCOUNTING187 select HAVE_VIRT_CPU_ACCOUNTING
187 select HAVE_VIRT_CPU_ACCOUNTING_IDLE188 select HAVE_VIRT_CPU_ACCOUNTING_IDLE
arch/s390/include/asm/hardirq.h+0−1
@@ -18,7 +18,6 @@ · 17 unmodified lines
18#define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x))18#define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x))
19 19
20#define __ARCH_IRQ_STAT20#define __ARCH_IRQ_STAT
21#define __ARCH_HAS_DO_SOFTIRQ
22#define __ARCH_IRQ_EXIT_IRQS_DISABLED21#define __ARCH_IRQ_EXIT_IRQS_DISABLED
23 22
24static inline void ack_bad_irq(unsigned int irq)23static inline void ack_bad_irq(unsigned int irq)
arch/sh/Kconfig+1−0
@@ -56,6 +56,7 @@ config SUPERH · 55 unmodified lines
56 select HAVE_PERF_EVENTS56 select HAVE_PERF_EVENTS
57 select HAVE_REGS_AND_STACK_ACCESS_API57 select HAVE_REGS_AND_STACK_ACCESS_API
58 select HAVE_UID1658 select HAVE_UID16
59 select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
59 select HAVE_STACKPROTECTOR60 select HAVE_STACKPROTECTOR
60 select HAVE_SYSCALL_TRACEPOINTS61 select HAVE_SYSCALL_TRACEPOINTS
61 select IRQ_FORCED_THREADING62 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
51#ifdef CONFIG_IRQSTACKS51#ifdef CONFIG_IRQSTACKS
52extern void irq_ctx_init(int cpu);52extern void irq_ctx_init(int cpu);
53extern void irq_ctx_exit(int cpu);53extern void irq_ctx_exit(int cpu);
54# define __ARCH_HAS_DO_SOFTIRQ
55#else54#else
56# define irq_ctx_init(cpu) do { } while (0)55# define irq_ctx_init(cpu) do { } while (0)
57# define irq_ctx_exit(cpu) do { } while (0)56# define irq_ctx_exit(cpu) do { } while (0)
arch/sparc/Kconfig+1−0
@@ -97,6 +97,7 @@ config SPARC64 · 96 unmodified lines
97 select ARCH_HAS_PTE_SPECIAL97 select ARCH_HAS_PTE_SPECIAL
98 select PCI_DOMAINS if PCI98 select PCI_DOMAINS if PCI
99 select ARCH_HAS_GIGANTIC_PAGE99 select ARCH_HAS_GIGANTIC_PAGE
100 select HAVE_SOFTIRQ_ON_OWN_STACK
100 101
101config ARCH_PROC_KCORE_TEXT102config ARCH_PROC_KCORE_TEXT
102 def_bool y103 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
93 93
94extern void *hardirq_stack[NR_CPUS];94extern void *hardirq_stack[NR_CPUS];
95extern void *softirq_stack[NR_CPUS];95extern void *softirq_stack[NR_CPUS];
96#define __ARCH_HAS_DO_SOFTIRQ
97 96
98#define NO_IRQ 0xffffffff97#define NO_IRQ 0xffffffff
99 98
arch/x86/Kconfig+1−0
@@ -221,6 +221,7 @@ config X86 · 220 unmodified lines
221 select HAVE_REGS_AND_STACK_ACCESS_API221 select HAVE_REGS_AND_STACK_ACCESS_API
222 select HAVE_RELIABLE_STACKTRACE if X86_64 && (UNWINDER_FRAME_POINTER || UNWINDER_ORC) && STACK_VALIDATION222 select HAVE_RELIABLE_STACKTRACE if X86_64 && (UNWINDER_FRAME_POINTER || UNWINDER_ORC) && STACK_VALIDATION
223 select HAVE_FUNCTION_ARG_ACCESS_API223 select HAVE_FUNCTION_ARG_ACCESS_API
224 select HAVE_SOFTIRQ_ON_OWN_STACK
224 select HAVE_STACKPROTECTOR if CC_HAS_SANE_STACKPROTECTOR225 select HAVE_STACKPROTECTOR if CC_HAS_SANE_STACKPROTECTOR
225 select HAVE_STACK_VALIDATION if X86_64226 select HAVE_STACK_VALIDATION if X86_64
226 select HAVE_STATIC_CALL227 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
25 25
26extern int irq_init_percpu_irqstack(unsigned int cpu);26extern int irq_init_percpu_irqstack(unsigned int cpu);
27 27
28#define __ARCH_HAS_DO_SOFTIRQ
29
30struct irq_desc;28struct irq_desc;
31 29
32extern void fixup_irqs(void);30extern void fixup_irqs(void);
include/linux/interrupt.h+1−1
@@ -569,7 +569,7 @@ struct softirq_action · 568 unmodified lines
569asmlinkage void do_softirq(void);569asmlinkage void do_softirq(void);
570asmlinkage void __do_softirq(void);570asmlinkage void __do_softirq(void);
571 571
572#ifdef __ARCH_HAS_DO_SOFTIRQ572#ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK
573void do_softirq_own_stack(void);573void do_softirq_own_stack(void);
574#else574#else
575static inline void do_softirq_own_stack(void)575static 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