From patchwork Mon Mar 17 14:53:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26383 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 584B7202FE for ; Mon, 17 Mar 2014 14:55:25 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf12357780qaq.10 for ; Mon, 17 Mar 2014 07:55:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=6jqjm5knw4QsjKa92L3cLrr4dwokTkqYiN6AiWZ1dDQ=; b=inSPSgMdm2s/LZAqwnnY1mdCT5sh0evpyoI/IP8Q3HZFRwJtfNbckeVkrlHJUy9h1w v7gjbipKbGshov+rP8UZ3FKr2XkyhAnnTRCowq1bXeasEXXIJ37chAyu2Zb5AJSZdiqG glNp6TBRWYhHUTpQB4WH8yEOlNaUuq36OxvfZTnNv0tzpUiY6T/kmiasI4lApXfQQAVy vFBIPQYihjjXI4B9GHvSe83Car+JJjym2VXS7rF1Oqfdn+lKPfR76xXG89rcLsFQSvQQ 9BMShIfDB6XrorIYsZVA0BRPkZ7NnqJNfdGWrZxZI3mSlll1NBNCYXp4rRbEMmnZoCsn I8iw== X-Gm-Message-State: ALoCoQnmzK0CoHuFO7bLulHF34QjMDqY6/CJuZ8cFkhrk8pe8nUn+KJT5IS9jbEt67Yz0DIV7c3K X-Received: by 10.58.168.137 with SMTP id zw9mr5424059veb.15.1395068125079; Mon, 17 Mar 2014 07:55:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.85 with SMTP id o79ls600883qgd.12.gmail; Mon, 17 Mar 2014 07:55:25 -0700 (PDT) X-Received: by 10.58.96.36 with SMTP id dp4mr6826137veb.21.1395068125000; Mon, 17 Mar 2014 07:55:25 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id tm8si1808370vdc.152.2014.03.17.07.55.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:55:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so5976614vcb.10 for ; Mon, 17 Mar 2014 07:55:24 -0700 (PDT) X-Received: by 10.52.65.132 with SMTP id x4mr790876vds.36.1395068124906; Mon, 17 Mar 2014 07:55:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp133104vck; Mon, 17 Mar 2014 07:55:24 -0700 (PDT) X-Received: by 10.220.95.139 with SMTP id d11mr7309216vcn.21.1395068124162; Mon, 17 Mar 2014 07:55:24 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id uw4si4669328vdc.1.2014.03.17.07.55.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:55:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPYv4-0001zj-Dh; Mon, 17 Mar 2014 14:53:38 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPYv1-0001wM-1e for xen-devel@lists.xen.org; Mon, 17 Mar 2014 14:53:35 +0000 Received: from [85.158.143.35:35013] by server-1.bemta-4.messagelabs.com id 6B/6B-09853-E6C07235; Mon, 17 Mar 2014 14:53:34 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1395068011!2678594!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30803 invoked from network); 17 Mar 2014 14:53:33 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 17 Mar 2014 14:53:33 -0000 X-IronPort-AV: E=Sophos;i="4.97,670,1389744000"; d="scan'208";a="110732380" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 17 Mar 2014 14:53:31 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Mon, 17 Mar 2014 10:53:30 -0400 Received: from drall.uk.xensource.com ([10.80.16.71] helo=drall.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1WPYuw-00012w-Nf; Mon, 17 Mar 2014 14:53:30 +0000 From: Ian Campbell To: Date: Mon, 17 Mar 2014 14:53:26 +0000 Message-ID: <1395068010-23344-4-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395067981.18221.35.camel@kazak.uk.xensource.com> References: <1395067981.18221.35.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH=v3 4/8] xen: arm: Use SMP barriers when that is all which is required. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: SMP barriers can be used when all we care about is synchronising against other processors. Signed-off-by: Ian Campbell Acked-by: Tim Deegan --- v2: Turn cpu_die mb()s into smp_mb()s. --- xen/arch/arm/mm.c | 2 +- xen/arch/arm/smpboot.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index b7360b6..e9b3f34 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -963,7 +963,7 @@ void share_xen_page_with_guest(struct page_info *page, page->u.inuse.type_info |= PGT_validated | 1; page_set_owner(page, d); - wmb(); /* install valid domain ptr before updating refcnt. */ + smp_wmb(); /* install valid domain ptr before updating refcnt. */ ASSERT((page->count_info & ~PGC_xen_heap) == 0); /* Only add to the allocation list if the domain isn't dying. */ diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index a829957..ce68d34 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -298,12 +298,12 @@ void __cpuinit start_secondary(unsigned long boot_phys_offset, /* Run local notifiers */ notify_cpu_starting(cpuid); - wmb(); + smp_wmb(); /* Now report this CPU is up */ smp_up_cpu = MPIDR_INVALID; cpumask_set_cpu(cpuid, &cpu_online_map); - wmb(); + smp_wmb(); local_irq_enable(); local_abort_enable(); @@ -330,7 +330,7 @@ void __cpu_disable(void) if ( cpu_disable_scheduler(cpu) ) BUG(); - mb(); + smp_mb(); /* Return to caller; eventually the IPI mechanism will unwind and the * scheduler will drop to the idle loop, which will call stop_cpu(). */ @@ -411,10 +411,10 @@ void __cpu_die(unsigned int cpu) process_pending_softirqs(); if ( (++i % 10) == 0 ) printk(KERN_ERR "CPU %u still not dead...\n", cpu); - mb(); + smp_mb(); } cpu_is_dead = 0; - mb(); + smp_mb(); } /*