Skip to content

Commit f448dda

Browse files
committed
Merge tag 'asm-generic-fixes-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull SOFTIRQ_ON_OWN_STACK rework from Arnd Bergmann: "Just one fixup patch, reworking the softirq_on_own_stack logic for preempt-rt kernels as discussed in https://lore.kernel.org/all/CAHk-=wgZSD3W2y6yczad2Am=EfHYyiPzTn3CfXxrriJf9i5W5w@mail.gmail.com/" * tag 'asm-generic-fixes-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig.
2 parents 5063578 + 8cbb2b5 commit f448dda

File tree

10 files changed

+13
-10
lines changed

10 files changed

+13
-10
lines changed

arch/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,9 @@ config HAVE_SOFTIRQ_ON_OWN_STACK
923923
Architecture provides a function to run __do_softirq() on a
924924
separate stack.
925925

926+
config SOFTIRQ_ON_OWN_STACK
927+
def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT
928+
926929
config ALTERNATE_USER_ADDRESS_SPACE
927930
bool
928931
help

arch/arm/kernel/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static void __init init_irq_stacks(void)
7070
}
7171
}
7272

73-
#ifndef CONFIG_PREEMPT_RT
73+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
7474
static void ____do_softirq(void *arg)
7575
{
7676
__do_softirq();

arch/parisc/kernel/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static void execute_on_irq_stack(void *func, unsigned long param1)
480480
*irq_stack_in_use = 1;
481481
}
482482

483-
#ifndef CONFIG_PREEMPT_RT
483+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
484484
void do_softirq_own_stack(void)
485485
{
486486
execute_on_irq_stack(__do_softirq, 0);

arch/powerpc/kernel/irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static inline void check_stack_overflow(unsigned long sp)
199199
}
200200
}
201201

202-
#ifndef CONFIG_PREEMPT_RT
202+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
203203
static __always_inline void call_do_softirq(const void *sp)
204204
{
205205
/* Temporarily switch r1 to sp, call __do_softirq() then restore r1. */
@@ -335,7 +335,7 @@ void *mcheckirq_ctx[NR_CPUS] __read_mostly;
335335
void *softirq_ctx[NR_CPUS] __read_mostly;
336336
void *hardirq_ctx[NR_CPUS] __read_mostly;
337337

338-
#ifndef CONFIG_PREEMPT_RT
338+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
339339
void do_softirq_own_stack(void)
340340
{
341341
call_do_softirq(softirq_ctx[smp_processor_id()]);

arch/s390/include/asm/softirq_stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <asm/lowcore.h>
66
#include <asm/stacktrace.h>
77

8-
#ifndef CONFIG_PREEMPT_RT
8+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
99
static inline void do_softirq_own_stack(void)
1010
{
1111
call_on_stack(0, S390_lowcore.async_stack, void, __do_softirq);

arch/sh/kernel/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void irq_ctx_exit(int cpu)
149149
hardirq_ctx[cpu] = NULL;
150150
}
151151

152-
#ifndef CONFIG_PREEMPT_RT
152+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
153153
void do_softirq_own_stack(void)
154154
{
155155
struct thread_info *curctx;

arch/sparc/kernel/irq_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs)
855855
set_irq_regs(old_regs);
856856
}
857857

858-
#ifndef CONFIG_PREEMPT_RT
858+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
859859
void do_softirq_own_stack(void)
860860
{
861861
void *orig_sp, *sp = softirq_stack[smp_processor_id()];

arch/x86/include/asm/irq_stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
IRQ_CONSTRAINTS, regs, vector); \
204204
}
205205

206-
#ifndef CONFIG_PREEMPT_RT
206+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
207207
/*
208208
* Macro to invoke __do_softirq on the irq stack. This is only called from
209209
* task context when bottom halves are about to be reenabled and soft

arch/x86/kernel/irq_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ int irq_init_percpu_irqstack(unsigned int cpu)
132132
return 0;
133133
}
134134

135-
#ifndef CONFIG_PREEMPT_RT
135+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
136136
void do_softirq_own_stack(void)
137137
{
138138
struct irq_stack *irqstk;

include/asm-generic/softirq_stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef __ASM_GENERIC_SOFTIRQ_STACK_H
33
#define __ASM_GENERIC_SOFTIRQ_STACK_H
44

5-
#if defined(CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK) && !defined(CONFIG_PREEMPT_RT)
5+
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
66
void do_softirq_own_stack(void);
77
#else
88
static inline void do_softirq_own_stack(void)

0 commit comments

Comments
 (0)