summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-02-13 17:12:01 +0100
committerSteven Rostedt <rostedt@goodmis.org>2013-04-24 11:46:05 -0400
commitfe65a34575e1f1c1c7698a69a774980f85ede825 (patch)
tree84b77df70da690c576ca62d48c8fd88de456991a
parent3f055c3a59229d1a33f9ecd5f42640f699462532 (diff)
downloadlinux-rt-fe65a34575e1f1c1c7698a69a774980f85ede825.tar.gz
softirq: Add more debugging
We really want to find code which calls __raise_softirq_irqsoff() and runs neither in hardirq context nor in a local_bh disabled region. This is even wrong on mainline as that code relies on random events to take care of it's newly raised softirq. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/softirq.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 66999ad8378e..385fceaf2f04 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -605,7 +605,7 @@ void thread_do_softirq(void)
}
}
-void __raise_softirq_irqoff(unsigned int nr)
+static void do_raise_softirq_irqoff(unsigned int nr)
{
trace_softirq_raise(nr);
or_softirq_pending(1UL << nr);
@@ -622,12 +622,19 @@ void __raise_softirq_irqoff(unsigned int nr)
__this_cpu_read(ksoftirqd)->softirqs_raised |= (1U << nr);
}
+void __raise_softirq_irqoff(unsigned int nr)
+{
+ do_raise_softirq_irqoff(nr);
+ if (!in_irq() && !current->softirq_nestcnt)
+ wakeup_softirqd();
+}
+
/*
* This function must run with irqs disabled!
*/
void raise_softirq_irqoff(unsigned int nr)
{
- __raise_softirq_irqoff(nr);
+ do_raise_softirq_irqoff(nr);
/*
* If we're in an hard interrupt we let irq return code deal
@@ -649,11 +656,6 @@ void raise_softirq_irqoff(unsigned int nr)
wakeup_softirqd();
}
-void do_raise_softirq_irqoff(unsigned int nr)
-{
- raise_softirq_irqoff(nr);
-}
-
static inline int ksoftirqd_softirq_pending(void)
{
return current->softirqs_raised;