1 From 8967b193c05d8862dec216c6d90f524f2642da70 Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Mon, 18 Jul 2011 13:59:17 +0200
4 Subject: [PATCH 110/366] softirq: Disable softirq stacks for RT
6 Disable extra stacks for softirqs. We want to preempt softirqs and
7 having them on special IRQ-stack does not make this easier.
9 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
11 arch/powerpc/kernel/irq.c | 2 ++
12 arch/powerpc/kernel/misc_32.S | 2 ++
13 arch/powerpc/kernel/misc_64.S | 2 ++
14 arch/sh/kernel/irq.c | 2 ++
15 arch/sparc/kernel/irq_64.c | 2 ++
16 arch/x86/entry/entry_64.S | 2 ++
17 arch/x86/kernel/irq_32.c | 2 ++
18 include/linux/interrupt.h | 2 +-
19 8 files changed, 15 insertions(+), 1 deletion(-)
21 diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
22 index 290559d..070afa6 100644
23 --- a/arch/powerpc/kernel/irq.c
24 +++ b/arch/powerpc/kernel/irq.c
25 @@ -614,6 +614,7 @@ void irq_ctx_init(void)
29 +#ifndef CONFIG_PREEMPT_RT_FULL
30 void do_softirq_own_stack(void)
32 struct thread_info *curtp, *irqtp;
33 @@ -631,6 +632,7 @@ void do_softirq_own_stack(void)
35 set_bits(irqtp->flags, &curtp->flags);
39 irq_hw_number_t virq_to_hw(unsigned int virq)
41 diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
42 index ed3ab50..8b26141 100644
43 --- a/arch/powerpc/kernel/misc_32.S
44 +++ b/arch/powerpc/kernel/misc_32.S
46 * We store the saved ksp_limit in the unused part
47 * of the STACK_FRAME_OVERHEAD
49 +#ifndef CONFIG_PREEMPT_RT_FULL
50 _GLOBAL(call_do_softirq)
53 @@ -56,6 +57,7 @@ _GLOBAL(call_do_softirq)
54 stw r10,THREAD+KSP_LIMIT(r2)
60 * void call_do_irq(struct pt_regs *regs, struct thread_info *irqtp);
61 diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
62 index db475d4..96b7ef8 100644
63 --- a/arch/powerpc/kernel/misc_64.S
64 +++ b/arch/powerpc/kernel/misc_64.S
69 +#ifndef CONFIG_PREEMPT_RT_FULL
70 _GLOBAL(call_do_softirq)
73 @@ -40,6 +41,7 @@ _GLOBAL(call_do_softirq)
81 diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
82 index 6c0378c..abd58b4 100644
83 --- a/arch/sh/kernel/irq.c
84 +++ b/arch/sh/kernel/irq.c
85 @@ -147,6 +147,7 @@ void irq_ctx_exit(int cpu)
86 hardirq_ctx[cpu] = NULL;
89 +#ifndef CONFIG_PREEMPT_RT_FULL
90 void do_softirq_own_stack(void)
92 struct thread_info *curctx;
93 @@ -174,6 +175,7 @@ void do_softirq_own_stack(void)
94 "r5", "r6", "r7", "r8", "r9", "r15", "t", "pr"
99 static inline void handle_one_irq(unsigned int irq)
101 diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
102 index e22416c..d359de7 100644
103 --- a/arch/sparc/kernel/irq_64.c
104 +++ b/arch/sparc/kernel/irq_64.c
105 @@ -854,6 +854,7 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs)
106 set_irq_regs(old_regs);
109 +#ifndef CONFIG_PREEMPT_RT_FULL
110 void do_softirq_own_stack(void)
112 void *orig_sp, *sp = softirq_stack[smp_processor_id()];
113 @@ -868,6 +869,7 @@ void do_softirq_own_stack(void)
114 __asm__ __volatile__("mov %0, %%sp"
119 #ifdef CONFIG_HOTPLUG_CPU
120 void fixup_irqs(void)
121 diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
122 index a55697d..5783f8f 100644
123 --- a/arch/x86/entry/entry_64.S
124 +++ b/arch/x86/entry/entry_64.S
125 @@ -867,6 +867,7 @@ bad_gs:
129 +#ifndef CONFIG_PREEMPT_RT_FULL
130 /* Call softirq on interrupt stack. Interrupts are off. */
131 ENTRY(do_softirq_own_stack)
133 @@ -879,6 +880,7 @@ ENTRY(do_softirq_own_stack)
134 decl PER_CPU_VAR(irq_count)
136 END(do_softirq_own_stack)
140 idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
141 diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
142 index 38da8f2..ce71f70 100644
143 --- a/arch/x86/kernel/irq_32.c
144 +++ b/arch/x86/kernel/irq_32.c
145 @@ -128,6 +128,7 @@ void irq_ctx_init(int cpu)
146 cpu, per_cpu(hardirq_stack, cpu), per_cpu(softirq_stack, cpu));
149 +#ifndef CONFIG_PREEMPT_RT_FULL
150 void do_softirq_own_stack(void)
152 struct thread_info *curstk;
153 @@ -146,6 +147,7 @@ void do_softirq_own_stack(void)
155 call_on_stack(__do_softirq, isp);
159 bool handle_irq(struct irq_desc *desc, struct pt_regs *regs)
161 diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
162 index 8564dba..44f401a 100644
163 --- a/include/linux/interrupt.h
164 +++ b/include/linux/interrupt.h
165 @@ -446,7 +446,7 @@ struct softirq_action
166 asmlinkage void do_softirq(void);
167 asmlinkage void __do_softirq(void);
169 -#ifdef __ARCH_HAS_DO_SOFTIRQ
170 +#if defined(__ARCH_HAS_DO_SOFTIRQ) && !defined(CONFIG_PREEMPT_RT_FULL)
171 void do_softirq_own_stack(void);
173 static inline void do_softirq_own_stack(void)