Skip to content

Commit bd00fcf

Browse files
Russell Kingbwhacks
authored andcommitted
ARM: fix rcu stalls on SMP platforms
commit 7deabca upstream. We can stall RCU processing on SMP platforms if a CPU sits in its idle loop for a long time. This happens because we don't call irq_enter() and irq_exit() around generic_smp_call_function_interrupt() and friends. Add the necessary calls, and remove the one from within ipi_timer(), so that they're all in a common place. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 parent a9f1af0 commit bd00fcf

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎arch/arm/kernel/smp.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
471471
static void ipi_timer(void)
472472
{
473473
struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
474-
irq_enter();
475474
evt->event_handler(evt);
476-
irq_exit();
477475
}
478476

479477
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
@@ -572,23 +570,31 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
572570

573571
switch (ipinr) {
574572
case IPI_TIMER:
573+
irq_enter();
575574
ipi_timer();
575+
irq_exit();
576576
break;
577577

578578
case IPI_RESCHEDULE:
579579
scheduler_ipi();
580580
break;
581581

582582
case IPI_CALL_FUNC:
583+
irq_enter();
583584
generic_smp_call_function_interrupt();
585+
irq_exit();
584586
break;
585587

586588
case IPI_CALL_FUNC_SINGLE:
589+
irq_enter();
587590
generic_smp_call_function_single_interrupt();
591+
irq_exit();
588592
break;
589593

590594
case IPI_CPU_STOP:
595+
irq_enter();
591596
ipi_cpu_stop(cpu);
597+
irq_exit();
592598
break;
593599

594600
default:

0 commit comments

Comments
 (0)