Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210210002513.181713427@linutronix.de

+13 -12
+6
arch/Kconfig
··· 759 759 This spares a stack switch and improves cache usage on softirq 760 760 processing. 761 761 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 + 762 768 config PGTABLE_LEVELS 763 769 int 764 770 default 2
+1
arch/parisc/Kconfig
··· 63 63 select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE 64 64 select HAVE_KPROBES_ON_FTRACE 65 65 select HAVE_DYNAMIC_FTRACE_WITH_REGS 66 + select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS 66 67 select SET_FS 67 68 68 69 help
-4
arch/parisc/include/asm/hardirq.h
··· 12 12 #include <linux/threads.h> 13 13 #include <linux/irq.h> 14 14 15 - #ifdef CONFIG_IRQSTACKS 16 - #define __ARCH_HAS_DO_SOFTIRQ 17 - #endif 18 - 19 15 typedef struct { 20 16 unsigned int __softirq_pending; 21 17 unsigned int kernel_stack_usage;
+1
arch/powerpc/Kconfig
··· 237 237 select MMU_GATHER_PAGE_SIZE 238 238 select HAVE_REGS_AND_STACK_ACCESS_API 239 239 select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN 240 + select HAVE_SOFTIRQ_ON_OWN_STACK 240 241 select HAVE_SYSCALL_TRACEPOINTS 241 242 select HAVE_VIRT_CPU_ACCOUNTING 242 243 select HAVE_IRQ_TIME_ACCOUNTING
-2
arch/powerpc/include/asm/irq.h
··· 37 37 38 38 struct pt_regs; 39 39 40 - #define __ARCH_HAS_DO_SOFTIRQ 41 - 42 40 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 43 41 /* 44 42 * Per-cpu stacks for handling critical, debug and machine check
+1
arch/s390/Kconfig
··· 182 182 select HAVE_REGS_AND_STACK_ACCESS_API 183 183 select HAVE_RELIABLE_STACKTRACE 184 184 select HAVE_RSEQ 185 + select HAVE_SOFTIRQ_ON_OWN_STACK 185 186 select HAVE_SYSCALL_TRACEPOINTS 186 187 select HAVE_VIRT_CPU_ACCOUNTING 187 188 select HAVE_VIRT_CPU_ACCOUNTING_IDLE
-1
arch/s390/include/asm/hardirq.h
··· 18 18 #define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x)) 19 19 20 20 #define __ARCH_IRQ_STAT 21 - #define __ARCH_HAS_DO_SOFTIRQ 22 21 #define __ARCH_IRQ_EXIT_IRQS_DISABLED 23 22 24 23 static inline void ack_bad_irq(unsigned int irq)
+1
arch/sh/Kconfig
··· 56 56 select HAVE_PERF_EVENTS 57 57 select HAVE_REGS_AND_STACK_ACCESS_API 58 58 select HAVE_UID16 59 + select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS 59 60 select HAVE_STACKPROTECTOR 60 61 select HAVE_SYSCALL_TRACEPOINTS 61 62 select IRQ_FORCED_THREADING
-1
arch/sh/include/asm/irq.h
··· 51 51 #ifdef CONFIG_IRQSTACKS 52 52 extern void irq_ctx_init(int cpu); 53 53 extern void irq_ctx_exit(int cpu); 54 - # define __ARCH_HAS_DO_SOFTIRQ 55 54 #else 56 55 # define irq_ctx_init(cpu) do { } while (0) 57 56 # define irq_ctx_exit(cpu) do { } while (0)
+1
arch/sparc/Kconfig
··· 97 97 select ARCH_HAS_PTE_SPECIAL 98 98 select PCI_DOMAINS if PCI 99 99 select ARCH_HAS_GIGANTIC_PAGE 100 + select HAVE_SOFTIRQ_ON_OWN_STACK 100 101 101 102 config ARCH_PROC_KCORE_TEXT 102 103 def_bool y
-1
arch/sparc/include/asm/irq_64.h
··· 93 93 94 94 extern void *hardirq_stack[NR_CPUS]; 95 95 extern void *softirq_stack[NR_CPUS]; 96 - #define __ARCH_HAS_DO_SOFTIRQ 97 96 98 97 #define NO_IRQ 0xffffffff 99 98
+1
arch/x86/Kconfig
··· 221 221 select HAVE_REGS_AND_STACK_ACCESS_API 222 222 select HAVE_RELIABLE_STACKTRACE if X86_64 && (UNWINDER_FRAME_POINTER || UNWINDER_ORC) && STACK_VALIDATION 223 223 select HAVE_FUNCTION_ARG_ACCESS_API 224 + select HAVE_SOFTIRQ_ON_OWN_STACK 224 225 select HAVE_STACKPROTECTOR if CC_HAS_SANE_STACKPROTECTOR 225 226 select HAVE_STACK_VALIDATION if X86_64 226 227 select HAVE_STATIC_CALL
-2
arch/x86/include/asm/irq.h
··· 25 25 26 26 extern int irq_init_percpu_irqstack(unsigned int cpu); 27 27 28 - #define __ARCH_HAS_DO_SOFTIRQ 29 - 30 28 struct irq_desc; 31 29 32 30 extern void fixup_irqs(void);
+1 -1
include/linux/interrupt.h
··· 569 569 asmlinkage void do_softirq(void); 570 570 asmlinkage void __do_softirq(void); 571 571 572 - #ifdef __ARCH_HAS_DO_SOFTIRQ 572 + #ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK 573 573 void do_softirq_own_stack(void); 574 574 #else 575 575 static inline void do_softirq_own_stack(void)