All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/11] ARM: fix rcu stalls on SMP platforms
Date: Thu, 19 Jan 2012 15:35:28 +0000	[thread overview]
Message-ID: <E1Rnu1Q-0002pr-2N@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20120119153149.GB1068@n2100.arm.linux.org.uk>

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>
---
 arch/arm/kernel/smp.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 57db122..26cdc49 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -443,9 +443,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
 static void ipi_timer(void)
 {
 	struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
-	irq_enter();
 	evt->event_handler(evt);
-	irq_exit();
 }
 
 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
@@ -548,7 +546,9 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
 
 	switch (ipinr) {
 	case IPI_TIMER:
+		irq_enter();
 		ipi_timer();
+		irq_exit();
 		break;
 
 	case IPI_RESCHEDULE:
@@ -556,15 +556,21 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
 		break;
 
 	case IPI_CALL_FUNC:
+		irq_enter();
 		generic_smp_call_function_interrupt();
+		irq_exit();
 		break;
 
 	case IPI_CALL_FUNC_SINGLE:
+		irq_enter();
 		generic_smp_call_function_single_interrupt();
+		irq_exit();
 		break;
 
 	case IPI_CPU_STOP:
+		irq_enter();
 		ipi_cpu_stop(cpu);
+		irq_exit();
 		break;
 
 	default:
-- 
1.7.4.4

  parent reply	other threads:[~2012-01-19 15:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 15:31 [PATCH 00/11] Recently pending ARM fixes Russell King - ARM Linux
2012-01-19 15:32 ` [PATCH 01/11] Revert "ARM: sa1100: clean up of the clock support" Russell King - ARM Linux
2012-01-19 15:33 ` [PATCH 02/11] Revert "ARM: pxa: add dummy clock for sa1100-rtc" Russell King - ARM Linux
2012-02-11 19:07   ` Jonathan Cameron
2012-02-11 19:42     ` Russell King - ARM Linux
2012-02-13 13:01       ` Haojian Zhuang
2012-02-27 18:24         ` Paul Parsons
2012-02-28  1:56           ` Haojian Zhuang
2012-01-19 15:33 ` [PATCH 03/11] Revert "RTC: sa1100: support sa1100, pxa and mmp soc families" Russell King - ARM Linux
2012-01-19 17:11   ` Nicolas Pitre
2012-01-19 17:17     ` Russell King - ARM Linux
2012-01-19 17:21       ` Russell King - ARM Linux
2012-01-19 17:27         ` Russell King - ARM Linux
2012-01-19 17:28         ` Nicolas Pitre
2012-01-19 15:34 ` [PATCH 05/11] ARM: sa11x0: fix collie build error Russell King - ARM Linux
2012-01-19 15:34 ` [PATCH 06/11] ARM: sa11x0: fix section mismatch in cpu-sa1100.c Russell King - ARM Linux
2012-01-19 15:34 ` [PATCH 07/11] ARM: fix a section mismatch warning with our use of memblock Russell King - ARM Linux
2012-01-19 15:35 ` [PATCH 08/11] ARM: vexpress: fix two section mismatch warnings Russell King - ARM Linux
2012-01-19 15:35 ` Russell King - ARM Linux [this message]
2012-01-19 15:35 ` [PATCH 10/11] ARM: 7279/1: standardize /proc/iomem "Kernel code" name Russell King - ARM Linux
2012-01-19 16:11   ` Uwe Kleine-König
2012-01-19 16:20     ` Russell King - ARM Linux
2012-01-19 15:36 ` [PATCH 11/11] ARM: 7277/1: setup.c: Fix build warning by removing unneeded header file Russell King - ARM Linux
2012-01-19 17:00 ` [PATCH 00/11] Recently pending ARM fixes Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Rnu1Q-0002pr-2N@rmk-PC.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.