From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: davem@davemloft.net, wli@holomorphy.com,
sparclinux@vger.kernel.org, manfred@colorfullife.com,
akpm@linux-foundation.org
Subject: [PATCH] prevent sparc64 from invoking irq handlers on offline CPUs
Date: Sun, 31 Aug 2008 10:33:49 -0700 [thread overview]
Message-ID: <20080831173349.GA15393@linux.vnet.ibm.com> (raw)
Make sparc64 refrain from clearing a given to-be-offlined CPU's bit in the
cpu_online_mask until it has processed pending irqs. This change
prevents other CPUs from being blindsided by an apparently offline CPU
nevertheless changing globally visible state.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
smp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 743ccad..b83a683 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1305,10 +1305,6 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;
- spin_lock(&call_lock);
- cpu_clear(cpu, cpu_online_map);
- spin_unlock(&call_lock);
-
smp_wmb();
/* Make sure no interrupts point to this cpu. */
@@ -1318,6 +1314,10 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();
+ spin_lock(&call_lock);
+ cpu_clear(cpu, cpu_online_map);
+ spin_unlock(&call_lock);
+
return 0;
}
next reply other threads:[~2008-08-31 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-31 17:33 Paul E. McKenney [this message]
2008-09-03 0:16 ` [PATCH] prevent sparc64 from invoking irq handlers on offline CPUs David Miller
2008-09-03 0:42 ` Paul E. McKenney
2008-09-03 9:21 ` David Miller
2008-09-03 15:42 ` Paul E. McKenney
2008-09-09 0:17 ` David Miller
2008-09-09 14:54 ` Paul E. McKenney
2008-09-09 18:49 ` Manfred Spraul
2008-09-09 19:57 ` David Miller
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=20080831173349.GA15393@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=sparclinux@vger.kernel.org \
--cc=wli@holomorphy.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox