Commit 7deabca0 authored by Russell King's avatar Russell King

ARM: fix rcu stalls on SMP platforms

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 94ae0275
...@@ -443,9 +443,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent); ...@@ -443,9 +443,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
static void ipi_timer(void) static void ipi_timer(void)
{ {
struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent); struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
irq_enter();
evt->event_handler(evt); evt->event_handler(evt);
irq_exit();
} }
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
...@@ -548,7 +546,9 @@ void handle_IPI(int ipinr, struct pt_regs *regs) ...@@ -548,7 +546,9 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
switch (ipinr) { switch (ipinr) {
case IPI_TIMER: case IPI_TIMER:
irq_enter();
ipi_timer(); ipi_timer();
irq_exit();
break; break;
case IPI_RESCHEDULE: case IPI_RESCHEDULE:
...@@ -556,15 +556,21 @@ void handle_IPI(int ipinr, struct pt_regs *regs) ...@@ -556,15 +556,21 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
break; break;
case IPI_CALL_FUNC: case IPI_CALL_FUNC:
irq_enter();
generic_smp_call_function_interrupt(); generic_smp_call_function_interrupt();
irq_exit();
break; break;
case IPI_CALL_FUNC_SINGLE: case IPI_CALL_FUNC_SINGLE:
irq_enter();
generic_smp_call_function_single_interrupt(); generic_smp_call_function_single_interrupt();
irq_exit();
break; break;
case IPI_CPU_STOP: case IPI_CPU_STOP:
irq_enter();
ipi_cpu_stop(cpu); ipi_cpu_stop(cpu);
irq_exit();
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment