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 <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Thomas Gleixner and committed by
Thomas Gleixner
ee5f80a9 5ceb1a04

+4 -3
+4 -3
kernel/softirq.c
··· 269 269 { 270 270 int cpu = smp_processor_id(); 271 271 272 - if (idle_cpu(cpu) && !in_interrupt()) 272 + if (idle_cpu(cpu) && !in_interrupt()) { 273 + __irq_enter(); 273 274 tick_check_idle(cpu); 274 - 275 - __irq_enter(); 275 + } else 276 + __irq_enter(); 276 277 } 277 278 278 279 #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED