diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-09-05 09:49:45 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-10-01 06:53:25 -0400 |
commit | 7d65f4a6553203da6a22097821d151fbbe7e4956 (patch) | |
tree | 4ac4162ca37756530112c29e8dbf1d2568313d81 /kernel/softirq.c | |
parent | ded797547548a5b8e7b92383a41e4c0e6b0ecb7f (diff) |
irq: Consolidate do_softirq() arch overriden implementations
All arch overriden implementations of do_softirq() share the following
common code: disable irqs (to avoid races with the pending check),
check if there are softirqs pending, then execute __do_softirq() on
a specific stack.
Consolidate the common parts such that archs only worry about the
stack switch.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@au1.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mackerras <paulus@au1.ibm.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index d7d498d8cc4f..26ee72725d29 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #define CREATE_TRACE_POINTS | 29 | #define CREATE_TRACE_POINTS |
30 | #include <trace/events/irq.h> | 30 | #include <trace/events/irq.h> |
31 | 31 | ||
32 | #include <asm/irq.h> | ||
33 | /* | 32 | /* |
34 | - No shared variables, all the data are CPU local. | 33 | - No shared variables, all the data are CPU local. |
35 | - If a softirq needs serialization, let it serialize itself | 34 | - If a softirq needs serialization, let it serialize itself |
@@ -283,7 +282,7 @@ restart: | |||
283 | tsk_restore_flags(current, old_flags, PF_MEMALLOC); | 282 | tsk_restore_flags(current, old_flags, PF_MEMALLOC); |
284 | } | 283 | } |
285 | 284 | ||
286 | #ifndef __ARCH_HAS_DO_SOFTIRQ | 285 | |
287 | 286 | ||
288 | asmlinkage void do_softirq(void) | 287 | asmlinkage void do_softirq(void) |
289 | { | 288 | { |
@@ -298,13 +297,12 @@ asmlinkage void do_softirq(void) | |||
298 | pending = local_softirq_pending(); | 297 | pending = local_softirq_pending(); |
299 | 298 | ||
300 | if (pending) | 299 | if (pending) |
301 | __do_softirq(); | 300 | do_softirq_own_stack(); |
302 | 301 | ||
302 | WARN_ON_ONCE(softirq_count()); | ||
303 | local_irq_restore(flags); | 303 | local_irq_restore(flags); |
304 | } | 304 | } |
305 | 305 | ||
306 | #endif | ||
307 | |||
308 | /* | 306 | /* |
309 | * Enter an interrupt context. | 307 | * Enter an interrupt context. |
310 | */ | 308 | */ |