|
@@ -332,15 +332,21 @@ void irq_enter(void)
|
|
|
static inline void invoke_softirq(void)
|
|
|
{
|
|
|
if (!force_irqthreads) {
|
|
|
+#ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
|
|
|
/*
|
|
|
* We can safely execute softirq on the current stack if
|
|
|
* it is the irq stack, because it should be near empty
|
|
|
- * at this stage. But we have no way to know if the arch
|
|
|
- * calls irq_exit() on the irq stack. So call softirq
|
|
|
- * in its own stack to prevent from any overrun on top
|
|
|
- * of a potentially deep task stack.
|
|
|
+ * at this stage.
|
|
|
+ */
|
|
|
+ __do_softirq();
|
|
|
+#else
|
|
|
+ /*
|
|
|
+ * Otherwise, irq_exit() is called on the task stack that can
|
|
|
+ * be potentially deep already. So call softirq in its own stack
|
|
|
+ * to prevent from any overrun.
|
|
|
*/
|
|
|
do_softirq_own_stack();
|
|
|
+#endif
|
|
|
} else {
|
|
|
wakeup_softirqd();
|
|
|
}
|