From patchwork Fri Nov 6 22:41:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 58224 X-Patchwork-Delegate: kyle@mcmartin.ca Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA6Mha12022373 for ; Fri, 6 Nov 2009 22:43:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933228AbZKFWmN (ORCPT ); Fri, 6 Nov 2009 17:42:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932405AbZKFWmL (ORCPT ); Fri, 6 Nov 2009 17:42:11 -0500 Received: from www.tglx.de ([62.245.132.106]:54047 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933210AbZKFWmG (ORCPT ); Fri, 6 Nov 2009 17:42:06 -0500 Received: from localhost.localdomain (www.tglx.de [127.0.0.1]) by www.tglx.de (8.13.8/8.13.8/TGLX-2007100201) with ESMTP id nA6MfpkL016725; Fri, 6 Nov 2009 23:41:52 +0100 Message-Id: <20091106223806.803538964@linutronix.de> User-Agent: quilt/0.47-1 Date: Fri, 06 Nov 2009 22:41:51 -0000 From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Peter Zijlstra , Kyle McMartin , linux-parisc@vger.kernel.org Subject: [patch 10/16] parisc: Replace old style lock init References: <20091106223547.784916750@linutronix.de> Content-Disposition: inline; filename=parisc-replace-old-style-lock-init.patch X-Virus-Scanned: clamav-milter 0.95.1 at www.tglx.de X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,AWL autolearn=failed version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on www.tglx.de Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org Index: linux-2.6/arch/parisc/kernel/smp.c =================================================================== --- linux-2.6.orig/arch/parisc/kernel/smp.c +++ linux-2.6/arch/parisc/kernel/smp.c @@ -60,8 +60,6 @@ static int smp_debug_lvl = 0; #define smp_debug(lvl, ...) do { } while(0) #endif /* DEBUG_SMP */ -DEFINE_SPINLOCK(smp_lock); - volatile struct task_struct *smp_init_current_idle_task; /* track which CPU is booting */ @@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cp static int parisc_max_cpus __cpuinitdata = 1; -DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED; +static DEFINE_PER_CPU(spinlock_t, ipi_lock); enum ipi_message_type { IPI_NOP=0, @@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void) */ void __init smp_prepare_cpus(unsigned int max_cpus) { + int cpu; + + for_each_possible_cpu(cpu) + spin_lock_init(&per_cpu(ipi_lock, cpu)); + init_cpu_present(cpumask_of(0)); parisc_max_cpus = max_cpus;