From patchwork Thu Feb 13 12:38:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 24593 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9E40202E2 for ; Thu, 13 Feb 2014 12:45:59 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id c14sf24524194vea.3 for ; Thu, 13 Feb 2014 04:45:58 -0800 (PST) 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=aJc0VtFgSBrArfJAT4urRa5IKCCA5uCjxbAHuHikgzA=; b=HR1MqVa57wgkoti1AVvNCqE1wCCqSJ6aUz28Q+GZYr6+3zZx+wqnxPt3ChQmRAYh5K pKYyjVy7F+wZLU7Owjj/7/22yQNfX3TQJ9Zp1wQyeNxL9sLf5vfzqIX67clv7nA0Xadw Ft++m9N22R9UddQ4sUWcl9TgWt5b4YJjLaoWi1t7WMmIwm7o1wpzc0rlb5K1sD0/TvBo IV7U5U8DxaoZ2/M9LqSkilDS+QqYgsFuGpirdpd3vm8XTzNTpweyZMpym10/aa0T9hOl vXS9sjOdXNCb2zrYW3X2gXGvAPJbjVUrx0VAddnZRK7JLp/az87PsD2VAum2MTpNd9YC 096w== X-Gm-Message-State: ALoCoQmiimZ+GJ6JCdVZxMbYbjGRjzU+YBV6D71zDeYf/DIrBDKPaM7h+IK3PUK22teyt5OE5zJk X-Received: by 10.59.11.65 with SMTP id eg1mr400343ved.11.1392295558746; Thu, 13 Feb 2014 04:45:58 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.35.208 with SMTP id n74ls3328692qgn.65.gmail; Thu, 13 Feb 2014 04:45:58 -0800 (PST) X-Received: by 10.58.48.133 with SMTP id l5mr137293ven.36.1392295558601; Thu, 13 Feb 2014 04:45:58 -0800 (PST) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id u7si608105vcn.112.2014.02.13.04.45.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 04:45:58 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id f12so8183104vbg.31 for ; Thu, 13 Feb 2014 04:45:58 -0800 (PST) X-Received: by 10.52.170.3 with SMTP id ai3mr689477vdc.35.1392295558503; Thu, 13 Feb 2014 04:45:58 -0800 (PST) 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.174.196 with SMTP id u4csp22878vcz; Thu, 13 Feb 2014 04:45:57 -0800 (PST) X-Received: by 10.224.172.133 with SMTP id l5mr1946480qaz.25.1392295205595; Thu, 13 Feb 2014 04:40:05 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id j10si1047124qas.91.2014.02.13.04.40.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Feb 2014 04:40:05 -0800 (PST) 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 1WDvYk-0002B6-PD; Thu, 13 Feb 2014 12:38:30 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDvYi-00027F-5f for xen-devel@lists.xen.org; Thu, 13 Feb 2014 12:38:28 +0000 Received: from [193.109.254.147:54734] by server-8.bemta-14.messagelabs.com id 6D/F6-18529-3CCBCF25; Thu, 13 Feb 2014 12:38:27 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1392295104!4060571!2 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.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3101 invoked from network); 13 Feb 2014 12:38:26 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 13 Feb 2014 12:38:26 -0000 X-IronPort-AV: E=Sophos;i="4.95,838,1384300800"; d="scan'208";a="100426776" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 13 Feb 2014 12:38:09 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Thu, 13 Feb 2014 07:38:09 -0500 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 1WDvYP-0003Bw-2P; Thu, 13 Feb 2014 12:38:09 +0000 From: Ian Campbell To: Date: Thu, 13 Feb 2014 12:38:04 +0000 Message-ID: <1392295088-24219-4-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1392295040.31985.7.camel@kazak.uk.xensource.com> References: <1392295040.31985.7.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 for-4.5 v2 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.212.44 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 f608020..ff19e39 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -967,7 +967,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(); } /*