From patchwork Mon Mar 17 14:52:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26377 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3E03E20143 for ; Mon, 17 Mar 2014 14:54:30 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id lh14sf13627943vcb.2 for ; Mon, 17 Mar 2014 07:54:29 -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 :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=IOFamBguT0CPx9Vod1WFpxPGm5jLXPrILZs2lQAQnjk=; b=MfVtWwyPK3jUs2JqdWMZG+3xMmlD9fzSSakgosR6d+lHgDQLjYHYJzNrF2Bri8EW0P Sbt0gw/H8pcQ2q1s77v4WquWk4WfW4HaMhWhwm/aj3c6MEQpQCwDWHOXGYaSkrju0fCF 20LyKBN3iF5x1FmdIHPIaLZdp+VGNBMN+ouOIlVi60Z7PR9uk7AqfpfnOs1vToZLJczH qwr4w1lTVGKkILJ0JUxzBhizpHVwK3YfB1czPxOGLB9YL9Ha3X7CkVvd0/oxt8xml5H9 AKmGI9BSiygm+Hj2HaM1faWlAGDgCefIVh8LyOXUqFNWBngDa1Z2Pn90ipoFYwCeJoNc 0LZw== X-Gm-Message-State: ALoCoQkmTPJI3XsJAxI+u5+J30/OVgVyKr9qpEmSqeLX3js+ATSfM4z36cLmd7bglXFcL/TkVwv8 X-Received: by 10.236.145.34 with SMTP id o22mr2649716yhj.22.1395068069933; Mon, 17 Mar 2014 07:54:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.14 with SMTP id 14ls1412695qgs.58.gmail; Mon, 17 Mar 2014 07:54:29 -0700 (PDT) X-Received: by 10.221.53.194 with SMTP id vr2mr16288vcb.41.1395068069789; Mon, 17 Mar 2014 07:54:29 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id dm2si4169010vec.3.2014.03.17.07.54.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:54:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 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.181; Received: by mail-vc0-f181.google.com with SMTP id id10so5739094vcb.26 for ; Mon, 17 Mar 2014 07:54:29 -0700 (PDT) X-Received: by 10.58.96.36 with SMTP id dp4mr6822112veb.21.1395068069709; Mon, 17 Mar 2014 07:54:29 -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 i9csp133052vck; Mon, 17 Mar 2014 07:54:29 -0700 (PDT) X-Received: by 10.140.37.214 with SMTP id r80mr27015194qgr.61.1395068069071; Mon, 17 Mar 2014 07:54:29 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 107si8733160qgn.8.2014.03.17.07.54.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:54:29 -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 1WPYuE-0001e6-7I; Mon, 17 Mar 2014 14:52:46 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPYuD-0001do-CB for xen-devel@lists.xen.org; Mon, 17 Mar 2014 14:52:45 +0000 Received: from [85.158.139.211:32235] by server-9.bemta-5.messagelabs.com id 1B/20-04350-C3C07235; Mon, 17 Mar 2014 14:52:44 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1395067961!1539305!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8029 invoked from network); 17 Mar 2014 14:52:42 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 17 Mar 2014 14:52:42 -0000 X-IronPort-AV: E=Sophos;i="4.97,670,1389744000"; d="scan'208";a="112135469" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Mar 2014 14:52:41 +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:52:40 -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 1WPYu8-00012I-AS; Mon, 17 Mar 2014 14:52:40 +0000 From: Ian Campbell To: Date: Mon, 17 Mar 2014 14:52:40 +0000 Message-ID: <1395067960-23225-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: ian.jackson@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH] xen: arm: use more specific barriers for read and write barriers. 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.181 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: Note that 32-bit does not provide a load variant of the inner shareable barrier, so that remains a full any-any barrier. Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini Acked-by: Tim Deegan --- xen/include/asm-arm/system.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h index 32ed277..7aaaf50 100644 --- a/xen/include/asm-arm/system.h +++ b/xen/include/asm-arm/system.h @@ -17,12 +17,21 @@ #define dmb(scope) asm volatile("dmb " #scope : : : "memory") #define mb() dsb(sy) -#define rmb() dsb(sy) -#define wmb() dsb(sy) +#ifdef CONFIG_ARM_64 +#define rmb() dsb(ld) +#else +#define rmb() dsb(sy) /* 32-bit has no ld variant. */ +#endif +#define wmb() dsb(st) #define smp_mb() dmb(ish) -#define smp_rmb() dmb(ish) -#define smp_wmb() dmb(ish) +#ifdef CONFIG_ARM_64 +#define smp_rmb() dmb(ishld) +#else +#define smp_rmb() dmb(ish) /* 32-bit has no ishld variant. */ +#endif + +#define smp_wmb() dmb(ishst) #define xchg(ptr,x) \ ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))