diff --git a/kernel/softirq.c b/kernel/softirq.c index d12af05cb7fe..f29a77eb3960 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -86,16 +86,12 @@ static void wakeup_softirqd(void) /* * If ksoftirqd is scheduled, we do not want to process pending softirqs - * right now. Let ksoftirqd handle this at its own rate, to get fairness, - * unless we're doing some of the synchronous softirqs. + * right now. Let ksoftirqd handle this at its own rate, to get fairness. */ -#define SOFTIRQ_NOW_MASK ((1 << HI_SOFTIRQ) | (1 << TASKLET_SOFTIRQ)) -static bool ksoftirqd_running(unsigned long pending) +static bool ksoftirqd_running(void) { struct task_struct *tsk = __this_cpu_read(ksoftirqd); - if (pending & SOFTIRQ_NOW_MASK) - return false; return tsk && (tsk->state == TASK_RUNNING); } @@ -354,7 +350,7 @@ asmlinkage __visible void do_softirq(void) pending = local_softirq_pending(); - if (pending && !ksoftirqd_running(pending)) + if (pending && !ksoftirqd_running()) do_softirq_own_stack(); local_irq_restore(flags); @@ -381,7 +377,7 @@ void irq_enter(void) static inline void invoke_softirq(void) { - if (ksoftirqd_running(local_softirq_pending())) + if (ksoftirqd_running()) return; if (!force_irqthreads) {