From patchwork Tue May 29 07:16:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Zhang X-Patchwork-Id: 161661 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 67F8BB7024 for ; Tue, 29 May 2012 17:19:07 +1000 (EST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 5D4F6B6EEB for ; Tue, 29 May 2012 17:18:12 +1000 (EST) Received: by vbip1 with SMTP id p1so2362122vbi.38 for ; Tue, 29 May 2012 00:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=60VS71cAqegNBo0S3z4FUAYUvnrOHa0T349wLp+Ocq4=; b=jbw2290Blx2n3Mo86XPvVWn20PztuZ96llEx86qBAUUoNzUnXQfAPwjFVDB1cwUUup D54VPGyiNYcMFZrwnlVWc3Q4Z4U+6r3SDgD7Df92KxfCj9EqpUUxiGSn9Ox5QljN81+L AX7SRp0S0WPpvF/BTZlxd+LiNFYVBye4rY7mSlPJC8cbqP3jrrod81BbUiGShBA1Td9b mV+bZGBOdDF12keAwMH42cnFgfhkO+89uDA5IZ7GRYaEIWBZKeeucaLPBY+SUzKBHY30 5NuimJTRNrdVKQXBGEHV8aVdEJX9ijwz/zsitbH35I7GqHsfp2qMHIJJ3+uNh0SN9UUf ZfXw== Received: by 10.220.221.7 with SMTP id ia7mr11684577vcb.31.1338275888390; Tue, 29 May 2012 00:18:08 -0700 (PDT) Received: from localhost ([61.148.56.138]) by mx.google.com with ESMTPS id z17sm8466753vdg.13.2012.05.29.00.18.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 00:18:07 -0700 (PDT) From: Yong Zhang To: linux-kernel@vger.kernel.org Subject: [RFC PATCH 09/10] POWERPC: smp: remove call to ipi_call_lock()/ipi_call_unlock() Date: Tue, 29 May 2012 15:16:04 +0800 Message-Id: <1338275765-3217-10-git-send-email-yong.zhang0@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1338275765-3217-1-git-send-email-yong.zhang0@gmail.com> References: <1338275765-3217-1-git-send-email-yong.zhang0@gmail.com> Cc: axboe@kernel.dk, sshtylyov@mvista.com, nikunj@linux.vnet.ibm.com, david.daney@cavium.com, peterz@infradead.org, akpm@linux-foundation.org, ralf@linux-mips.org, Paul Mackerras , srivatsa.bhat@linux.vnet.ibm.com, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, mingo@kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org From: Yong Zhang 1) call_function.lock used in smp_call_function_many() is just to protect call_function.queue and &data->refs, cpu_online_mask is outside of the lock. And it's not necessary to protect cpu_online_mask, because data->cpumask is pre-calculate and even if a cpu is brougt up when calling arch_send_call_function_ipi_mask(), it's harmless because validation test in generic_smp_call_function_interrupt() will take care of it. 2) For cpu down issue, stop_machine() will guarantee that no concurrent smp_call_fuction() is processing. Signed-off-by: Yong Zhang Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/smp.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index e4cb343..e1417c4 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -571,7 +571,6 @@ void __devinit start_secondary(void *unused) if (system_state == SYSTEM_RUNNING) vdso_data->processorCount++; #endif - ipi_call_lock(); notify_cpu_starting(cpu); set_cpu_online(cpu, true); /* Update sibling maps */ @@ -601,7 +600,6 @@ void __devinit start_secondary(void *unused) of_node_put(np); } of_node_put(l2_cache); - ipi_call_unlock(); local_irq_enable();