From patchwork Mon Mar 17 14:53:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26378 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8175B20143 for ; Mon, 17 Mar 2014 14:54:32 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id i17sf13472274qcy.7 for ; Mon, 17 Mar 2014 07:54:32 -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=aVFBEbK29Q9fflDkZvCenuP2WZwqlkcohTTPngF37Os=; b=lSMncao4G7atbyAwpSfVwDoX2WrWvhXbZjvieX52s76Qqg/kaAdClWuu8saqgaTIlA BIMAF0hyFnY0nHWuoAEXmIC95gQKBMKNuqwD0qvHnhfD6smwC6HlyjSbaXWTbdpAh1v8 MvmdnmCucwAVDTn22lZj2/o5L6AntOCUo7T1sXcBOvcDLNzaczvajjBkWRS4kizAGwHZ X7LoIbbglpVjeCJ90Z/ZIayuMxPe2zJt7jqXgx8S6NRBReYUTrrbqrn83GgMrgUfn5Ey EIjaDe2kqFGU5vy0y3aECPXG7lTXNjoCH40gl25reyZzR4eX9oPI+chu8xTsq3eglVWv RsGg== X-Gm-Message-State: ALoCoQkPXm/+0/fkfuxCVdYFDCaT9i3Xpmfmex5jKDC2k9UxRjsT997N/fIvNtHW7KLadmXTk1Cj X-Received: by 10.236.17.161 with SMTP id j21mr1820235yhj.55.1395068072079; Mon, 17 Mar 2014 07:54:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.50 with SMTP id l47ls1663963qga.49.gmail; Mon, 17 Mar 2014 07:54:31 -0700 (PDT) X-Received: by 10.52.147.238 with SMTP id tn14mr16975747vdb.23.1395068071869; Mon, 17 Mar 2014 07:54:31 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id yv18si5339317vcb.14.2014.03.17.07.54.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:54:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id im17so5781414vcb.23 for ; Mon, 17 Mar 2014 07:54:31 -0700 (PDT) X-Received: by 10.58.248.5 with SMTP id yi5mr128992vec.42.1395068071786; Mon, 17 Mar 2014 07:54:31 -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 i9csp133055vck; Mon, 17 Mar 2014 07:54:31 -0700 (PDT) X-Received: by 10.221.39.138 with SMTP id tm10mr20382488vcb.7.1395068071333; Mon, 17 Mar 2014 07:54:31 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id f17si5326471vco.102.2014.03.17.07.54.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 07:54:31 -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 1WPYv3-0001yp-EO; Mon, 17 Mar 2014 14:53:37 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPYv0-0001w5-HX for xen-devel@lists.xen.org; Mon, 17 Mar 2014 14:53:34 +0000 Received: from [85.158.143.35:38800] by server-2.bemta-4.messagelabs.com id C4/D8-06539-D6C07235; Mon, 17 Mar 2014 14:53:33 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1395068011!2678594!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.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30741 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="110732379" 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-Ji; Mon, 17 Mar 2014 14:53:30 +0000 From: Ian Campbell To: Date: Mon, 17 Mar 2014 14:53:25 +0000 Message-ID: <1395068010-23344-3-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 3/8] xen: arm: consolidate barrier definitions 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.178 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: These are effectively identical on both 32- and 64-bit. The only difference is that they implicit "sy" on 32-bit becomes explicit. Signed-off-by: Ian Campbell Acked-by: Tim Deegan Acked-by: Stefano Stabellini --- xen/include/asm-arm/arm32/system.h | 16 ---------------- xen/include/asm-arm/arm64/system.h | 17 ----------------- xen/include/asm-arm/system.h | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 33 deletions(-) diff --git a/xen/include/asm-arm/arm32/system.h b/xen/include/asm-arm/arm32/system.h index 60148cb..9f233fe 100644 --- a/xen/include/asm-arm/arm32/system.h +++ b/xen/include/asm-arm/arm32/system.h @@ -2,22 +2,6 @@ #ifndef __ASM_ARM32_SYSTEM_H #define __ASM_ARM32_SYSTEM_H -#define sev() __asm__ __volatile__ ("sev" : : : "memory") -#define wfe() __asm__ __volatile__ ("wfe" : : : "memory") -#define wfi() __asm__ __volatile__ ("wfi" : : : "memory") - -#define isb() __asm__ __volatile__ ("isb" : : : "memory") -#define dsb() __asm__ __volatile__ ("dsb" : : : "memory") -#define dmb() __asm__ __volatile__ ("dmb" : : : "memory") - -#define mb() dsb() -#define rmb() dsb() -#define wmb() mb() - -#define smp_mb() mb() -#define smp_rmb() rmb() -#define smp_wmb() wmb() - extern void __bad_xchg(volatile void *, int); static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h index d7e912f..570af5c 100644 --- a/xen/include/asm-arm/arm64/system.h +++ b/xen/include/asm-arm/arm64/system.h @@ -2,23 +2,6 @@ #ifndef __ASM_ARM64_SYSTEM_H #define __ASM_ARM64_SYSTEM_H -#define sev() asm volatile("sev" : : : "memory") -#define wfe() asm volatile("wfe" : : : "memory") -#define wfi() asm volatile("wfi" : : : "memory") - -#define isb() asm volatile("isb" : : : "memory") -#define dsb() asm volatile("dsb sy" : : : "memory") -#define dmb() asm volatile("dmb sy" : : : "memory") - -#define mb() dsb() -#define rmb() dsb() -#define wmb() mb() - -#define smp_mb() mb() -#define smp_rmb() rmb() -#define smp_wmb() wmb() - - extern void __bad_xchg(volatile void *, int); static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h index 290d38d..e003624 100644 --- a/xen/include/asm-arm/system.h +++ b/xen/include/asm-arm/system.h @@ -8,6 +8,22 @@ #define nop() \ asm volatile ( "nop" ) +#define sev() asm volatile("sev" : : : "memory") +#define wfe() asm volatile("wfe" : : : "memory") +#define wfi() asm volatile("wfi" : : : "memory") + +#define isb() asm volatile("isb" : : : "memory") +#define dsb() asm volatile("dsb sy" : : : "memory") +#define dmb() asm volatile("dmb sy" : : : "memory") + +#define mb() dsb() +#define rmb() dsb() +#define wmb() mb() + +#define smp_mb() mb() +#define smp_rmb() rmb() +#define smp_wmb() wmb() + #define xchg(ptr,x) \ ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))