From: "Srivatsa S. Bhat" <srivatsa.bhat@linux•vnet.ibm.com>
To: Ingo Molnar <mingo@elte•hu>
Cc: Andi Kleen <ak@linux•intel.com>, Nick Piggin <npiggin@kernel•dk>,
"Paul E. McKenney" <paulmck@linux•vnet.ibm.com>,
Rusty Russell <rusty@rustcorp•com.au>,
linux-kernel <linux-kernel@vger•kernel.org>,
"Rafael J. Wysocki" <rjw@sisk•pl>,
Paul Gortmaker <paul.gortmaker@windriver•com>,
Alexander Viro <viro@zeniv•linux.org.uk>,
KOSAKI Motohiro <kosaki.motohiro@jp•fujitsu.com>,
sparclinux@vger•kernel.org, linux-fsdevel@vger•kernel.org,
Andrew Morton <akpm@linux-foundation•org>,
Arjan van de Ven <arjan.van.de.ven@intel•com>,
ppc-dev <linuxppc-dev@lists•ozlabs.org>,
"David S. Miller" <davem@davemloft•net>,
Peter Zijlstra <a.p.zijlstra@chello•nl>
Subject: [PATCH 3/3] CPU hotplug, arch/sparc: Fix CPU hotplug callback registration
Date: Thu, 01 Mar 2012 13:48:30 +0530 [thread overview]
Message-ID: <4F4F30D6.3000707@linux.vnet.ibm.com> (raw)
In-Reply-To: <4F4F2F7F.5040207@linux.vnet.ibm.com>
Restructure CPU hotplug setup and callback registration in topology_init
so as to be race-free.
---
arch/sparc/kernel/sysfs.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/sparc/kernel/sysfs.c b/arch/sparc/kernel/sysfs.c
index 654e8aa..22cb881 100644
--- a/arch/sparc/kernel/sysfs.c
+++ b/arch/sparc/kernel/sysfs.c
@@ -300,16 +300,14 @@ static int __init topology_init(void)
check_mmu_stats();
- register_cpu_notifier(&sysfs_cpu_nb);
-
for_each_possible_cpu(cpu) {
struct cpu *c = &per_cpu(cpu_devices, cpu);
register_cpu(c, cpu);
- if (cpu_online(cpu))
- register_cpu_online(cpu);
}
+ register_allcpu_notifier(&sysfs_cpu_nb, true, NULL);
+
return 0;
}
prev parent reply other threads:[~2012-03-01 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87ehtf3lqh.fsf@rustcorp.com.au>
[not found] ` <20120227155338.7b5110cd.akpm@linux-foundation.org>
[not found] ` <20120228084359.GJ21106@elte.hu>
[not found] ` <20120228132719.f375071a.akpm@linux-foundation.org>
[not found] ` <4F4DBB26.2060907@linux.vnet.ibm.com>
[not found] ` <20120229091732.GA11505@elte.hu>
[not found] ` <4F4E083A.2080304@linux.vnet.ibm.com>
2012-03-01 8:12 ` [PATCH] cpumask: fix lg_lock/br_lock Srivatsa S. Bhat
2012-03-01 8:15 ` [PATCH 1/3] CPU hotplug: Fix issues with callback registration Srivatsa S. Bhat
2012-03-01 8:16 ` [PATCH 2/3] CPU hotplug, arch/powerpc: Fix CPU hotplug " Srivatsa S. Bhat
2012-03-01 8:18 ` Srivatsa S. Bhat [this message]
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=4F4F30D6.3000707@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux$(echo .)vnet.ibm.com \
--cc=a.p.zijlstra@chello$(echo .)nl \
--cc=ak@linux$(echo .)intel.com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=arjan.van.de.ven@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=kosaki.motohiro@jp$(echo .)fujitsu.com \
--cc=linux-fsdevel@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mingo@elte$(echo .)hu \
--cc=npiggin@kernel$(echo .)dk \
--cc=paul.gortmaker@windriver$(echo .)com \
--cc=paulmck@linux$(echo .)vnet.ibm.com \
--cc=rjw@sisk$(echo .)pl \
--cc=rusty@rustcorp$(echo .)com.au \
--cc=sparclinux@vger$(echo .)kernel.org \
--cc=viro@zeniv$(echo .)linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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