Skip to content

Commit

Permalink
softirq: Reduce invoke_softirq() code duplication
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Thomas Gleixner committed Mar 6, 2012
1 parent a09b659 commit b2a0017
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions kernel/softirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b2a0017

Please sign in to comment.