summaryrefslogtreecommitdiffstats
path: root/kernel/softirq.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-03-05 15:07:25 -0800
committerThomas Gleixner <tglx@linutronix.de>2012-03-06 13:33:27 +0100
commitb2a00178614e2cdd981a708d22a05c1ce4eadfd7 (patch)
tree774ffcfab7e84497ae39ab8f944a1c19deccc46d /kernel/softirq.c
parenta09b659cd68c10ec6a30cb91ebd2c327fcd5bfe5 (diff)
downloadblackbird-op-linux-b2a00178614e2cdd981a708d22a05c1ce4eadfd7.tar.gz
blackbird-op-linux-b2a00178614e2cdd981a708d22a05c1ce4eadfd7.zip
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.c18
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)
__irq_enter();
}
-#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
static inline void invoke_softirq(void)
{
- if (!force_irqthreads)
+ if (!force_irqthreads) {
+#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
__do_softirq();
- else {
- __local_bh_disable((unsigned long)__builtin_return_address(0),
- SOFTIRQ_OFFSET);
- wakeup_softirqd();
- __local_bh_enable(SOFTIRQ_OFFSET);
- }
-}
#else
-static inline void invoke_softirq(void)
-{
- if (!force_irqthreads)
do_softirq();
- else {
+#endif
+ } else {
__local_bh_disable((unsigned long)__builtin_return_address(0),
SOFTIRQ_OFFSET);
wakeup_softirqd();
__local_bh_enable(SOFTIRQ_OFFSET);
}
}
-#endif
/*
* Exit an interrupt context. Process softirqs if needed and possible:
OpenPOWER on IntegriCloud