* [PATCH] softirq: reduce invoke_softirq() code duplication
@ 2012-02-13 12:04 Heiko Carstens
0 siblings, 0 replies; only message in thread
From: Heiko Carstens @ 2012-02-13 12:04 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Thomas Gleixner; +Cc: linux-kernel
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>
---
kernel/softirq.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 4eb3a0f..c82d95a 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:
--
1.7.9
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-13 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 12:04 [PATCH] softirq: reduce invoke_softirq() code duplication Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®