Skip to content

Commit ee5f80a

Browse files
KAGA-KOKOThomas Gleixner
authored andcommitted
irq: call __irq_enter() before calling the tick_idle_check
Impact: avoid spurious ksoftirqd wakeups The tick idle check which is called from irq_enter() was run before the call to __irq_enter() which did not set the in_interrupt() bits in preempt_count. That way the raise of a softirq woke up softirqd for nothing as the softirq was handled on return from interrupt. Call __irq_enter() before calling into the tick idle check code. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 5ceb1a0 commit ee5f80a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kernel/softirq.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,11 @@ void irq_enter(void)
269269
{
270270
int cpu = smp_processor_id();
271271

272-
if (idle_cpu(cpu) && !in_interrupt())
272+
if (idle_cpu(cpu) && !in_interrupt()) {
273+
__irq_enter();
273274
tick_check_idle(cpu);
274-
275-
__irq_enter();
275+
} else
276+
__irq_enter();
276277
}
277278

278279
#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED

0 commit comments

Comments
 (0)