From patchwork Thu Mar 1 08:18:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa S. Bhat" X-Patchwork-Id: 143952 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 74B5B100802 for ; Thu, 1 Mar 2012 19:18:57 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758594Ab2CAIS4 (ORCPT ); Thu, 1 Mar 2012 03:18:56 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:59301 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757454Ab2CAIS4 (ORCPT ); Thu, 1 Mar 2012 03:18:56 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Mar 2012 13:48:53 +0530 Received: from d28relay02.in.ibm.com (9.184.220.59) by e28smtp03.in.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 1 Mar 2012 13:48:35 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q218IYkB3440644; Thu, 1 Mar 2012 13:48:34 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q218IVkN006038; Thu, 1 Mar 2012 13:48:34 +0530 Received: from srivatsabhat.in.ibm.com (srivatsabhat.in.ibm.com [9.124.35.226]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q218IUmj006023; Thu, 1 Mar 2012 13:48:30 +0530 Message-ID: <4F4F30D6.3000707@linux.vnet.ibm.com> Date: Thu, 01 Mar 2012 13:48:30 +0530 From: "Srivatsa S. Bhat" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Ingo Molnar CC: sparclinux@vger.kernel.org, Andi Kleen , Nick Piggin , KOSAKI Motohiro , Rusty Russell , linux-kernel , "Rafael J. Wysocki" , Paul Gortmaker , Alexander Viro , Arjan van de Ven , linux-fsdevel@vger.kernel.org, Andrew Morton , "Paul E. McKenney" , ppc-dev , "David S. Miller" , Peter Zijlstra Subject: [PATCH 3/3] CPU hotplug, arch/sparc: Fix CPU hotplug callback registration References: <87ehtf3lqh.fsf@rustcorp.com.au> <20120227155338.7b5110cd.akpm@linux-foundation.org> <20120228084359.GJ21106@elte.hu> <20120228132719.f375071a.akpm@linux-foundation.org> <4F4DBB26.2060907@linux.vnet.ibm.com> <20120229091732.GA11505@elte.hu> <4F4E083A.2080304@linux.vnet.ibm.com> <4F4F2F7F.5040207@linux.vnet.ibm.com> In-Reply-To: <4F4F2F7F.5040207@linux.vnet.ibm.com> x-cbid: 12030108-3864-0000-0000-000001A46E12 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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(-) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }