From patchwork Thu Feb 13 12:38:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 24592 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6EC98202E2 for ; Thu, 13 Feb 2014 12:40:08 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id p5sf22322359vbn.10 for ; Thu, 13 Feb 2014 04:40:07 -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=aVFBEbK29Q9fflDkZvCenuP2WZwqlkcohTTPngF37Os=; b=Kj4PPA61hTWYHEN1AUEHe933fMZABDMznhs/ndCejmm26jdxIQx5kTXOTtIg2LvDSM xQJs2Tgk86DHiChKNTusAFxk8byPC7xaeywml4ZHtBeGemtyctIw1lmDzlrOozv18Vml qkYXHMdH/ofjDhn/HPWJ4rpvzz1SV7ZYnvfNKFKenIGnWEF6pWl2q5RtNpGCLOlFEu2S 9nwfIEZVFgXqvSysd4tEu5PemIQei/LfESJ+0En91uMDgefhQGyB3egbvSPyGhyBP+fi W/bqM3iTCfa+PNUD8YQ5U0oAIW2k3Ir5mcXAMcnoBDamjiwcE0ZDvMXm5sGkKfqwlcU8 b51Q== X-Gm-Message-State: ALoCoQnY6KuACka/dGUirTSnHytE5rdX12sFoyY/tDq5Er9OKMy6v6ftbRGG4CpgrHbNb82darrU X-Received: by 10.58.218.40 with SMTP id pd8mr396013vec.39.1392295207471; Thu, 13 Feb 2014 04:40:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.165 with SMTP id x34ls2421875qgx.53.gmail; Thu, 13 Feb 2014 04:40:07 -0800 (PST) X-Received: by 10.58.161.46 with SMTP id xp14mr121636veb.37.1392295207255; Thu, 13 Feb 2014 04:40:07 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id sq4si604791vdc.93.2014.02.13.04.40.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 04:40:07 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so8396920vea.17 for ; Thu, 13 Feb 2014 04:40:07 -0800 (PST) X-Received: by 10.58.49.129 with SMTP id u1mr877557ven.0.1392295207166; Thu, 13 Feb 2014 04:40:07 -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 u4csp22569vcz; Thu, 13 Feb 2014 04:40:06 -0800 (PST) X-Received: by 10.52.247.231 with SMTP id yh7mr702426vdc.34.1392295206768; Thu, 13 Feb 2014 04:40:06 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id sx1si599466vdc.127.2014.02.13.04.40.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Feb 2014 04:40:06 -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 1WDvYh-00026w-Gu; Thu, 13 Feb 2014 12:38:27 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDvYg-00025z-9X for xen-devel@lists.xen.org; Thu, 13 Feb 2014 12:38:26 +0000 Received: from [85.158.143.35:35488] by server-3.bemta-4.messagelabs.com id DD/34-11539-1CCBCF25; Thu, 13 Feb 2014 12:38:25 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1392295102!5414705!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 19353 invoked from network); 13 Feb 2014 12:38:24 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 13 Feb 2014 12:38:24 -0000 X-IronPort-AV: E=Sophos;i="4.95,838,1384300800"; d="scan'208";a="100426775" 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 1WDvYO-0003Bw-V2; Thu, 13 Feb 2014 12:38:09 +0000 From: Ian Campbell To: Date: Thu, 13 Feb 2014 12:38:03 +0000 Message-ID: <1392295088-24219-3-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 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.128.172 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))))