diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-03-05 18:07:25 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-03-06 07:33:27 -0500 |
commit | b2a00178614e2cdd981a708d22a05c1ce4eadfd7 (patch) | |
tree | 774ffcfab7e84497ae39ab8f944a1c19deccc46d /kernel/softirq.c | |
parent | a09b659cd68c10ec6a30cb91ebd2c327fcd5bfe5 (diff) |
softirq: Reduce invoke_softirq() code duplication
The two invoke_softirq() variants are identical except for a single
line. So move the #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED inside one of
the functions and get rid of the other one.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 4eb3a0fa351e..c82d95a022ef 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -310,31 +310,21 @@ void irq_enter(void) | |||
310 | __irq_enter(); | 310 | __irq_enter(); |
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED | ||
314 | static inline void invoke_softirq(void) | 313 | static inline void invoke_softirq(void) |
315 | { | 314 | { |
316 | if (!force_irqthreads) | 315 | if (!force_irqthreads) { |
316 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED | ||
317 | __do_softirq(); | 317 | __do_softirq(); |
318 | else { | ||
319 | __local_bh_disable((unsigned long)__builtin_return_address(0), | ||
320 | SOFTIRQ_OFFSET); | ||
321 | wakeup_softirqd(); | ||
322 | __local_bh_enable(SOFTIRQ_OFFSET); | ||
323 | } | ||
324 | } | ||
325 | #else | 318 | #else |
326 | static inline void invoke_softirq(void) | ||
327 | { | ||
328 | if (!force_irqthreads) | ||
329 | do_softirq(); | 319 | do_softirq(); |
330 | else { | 320 | #endif |
321 | } else { | ||
331 | __local_bh_disable((unsigned long)__builtin_return_address(0), | 322 | __local_bh_disable((unsigned long)__builtin_return_address(0), |
332 | SOFTIRQ_OFFSET); | 323 | SOFTIRQ_OFFSET); |
333 | wakeup_softirqd(); | 324 | wakeup_softirqd(); |
334 | __local_bh_enable(SOFTIRQ_OFFSET); | 325 | __local_bh_enable(SOFTIRQ_OFFSET); |
335 | } | 326 | } |
336 | } | 327 | } |
337 | #endif | ||
338 | 328 | ||
339 | /* | 329 | /* |
340 | * Exit an interrupt context. Process softirqs if needed and possible: | 330 | * Exit an interrupt context. Process softirqs if needed and possible: |