From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: linux-ia64 <linux-ia64@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Ashok Raj <ashok.raj@intel.com>,
"Luck, Tony" <tony.luck@intel.com>, Andrew Morton <akpm@osdl.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Subject: [BUGFIX] [PATCH 1/2] cpu-hotplug: Fixing confliction between CPU hot-add and IPI
Date: Fri, 27 Oct 2006 10:49:53 +0000 [thread overview]
Message-ID: <87mz7ivxri.wl%takeuchi_satoru@jp.fujitsu.com> (raw)
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
---
Fixing the confliction between CPU hot-add and IPI.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Acked-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Index: linux-2.6.19-rc3/arch/ia64/kernel/smp.c
=================================--- linux-2.6.19-rc3.orig/arch/ia64/kernel/smp.c 2006-10-27 18:40:47.000000000 +0900
+++ linux-2.6.19-rc3/arch/ia64/kernel/smp.c 2006-10-27 18:49:48.000000000 +0900
@@ -328,10 +328,14 @@
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wait)
{
struct call_data_struct data;
- int cpus = num_online_cpus()-1;
+ int cpus;
- if (!cpus)
+ spin_lock(&call_lock);
+ cpus = num_online_cpus() - 1;
+ if (!cpus) {
+ spin_unlock(&call_lock);
return 0;
+ }
/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());
@@ -343,8 +347,6 @@
if (wait)
atomic_set(&data.finished, 0);
- spin_lock(&call_lock);
-
call_data = &data;
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC */
send_IPI_allbutself(IPI_CALL_FUNC);
next reply other threads:[~2006-10-27 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-27 10:49 Satoru Takeuchi [this message]
2006-10-27 13:28 ` [BUGFIX] [PATCH 1/2] cpu-hotplug: Fixing confliction between KAMEZAWA Hiroyuki
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=87mz7ivxri.wl%takeuchi_satoru@jp.fujitsu.com \
--to=takeuchi_satoru@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=ashok.raj@intel.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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