From patchwork Wed Nov 29 17:46:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 120038 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3352455qgn; Wed, 29 Nov 2017 09:48:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMYYUHXBDIjf7d+5qaAFKuWcwGTHbE5V17/BYv/0lIb/tqyT3d8xdTpud4WjdY7uinXJMlx6 X-Received: by 10.36.217.21 with SMTP id p21mr7875554itg.92.1511977722494; Wed, 29 Nov 2017 09:48:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511977722; cv=none; d=google.com; s=arc-20160816; b=nErsdgEuTvlzl63Ke6oeYELLq+MuVClIJBzVbgRhmJytITZ/H9mpdyUnPCl3Ao2TOt PxKzfO5z9fVkxrgqzw0mp2xfhIuQ/yBDSggwDd3mr6INC4I5dYPNKnyFshwE8j8mgWqB Kk2f1xmwaob7Vs8JOTJ3/HWJQfxPb631ObP2WS/3JIcUG+mBXK1m3LjlT77i0HIZ9uSs 5Mtl9xn+i+CUmlTAmZou7ijKpeEim7zh4ejenMFd5UfdgW1rrtASYlZIkxcObw3KzjWH XVCJcl2z72PRZxOpN/biB00jg45Ikfr0EXwKx2GQfYaRH221lrH9zvWPJcpfK4xbIr7F O3Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=id2/r3DhFuwqpkZOVtR838OSMnd9uJxBh/HlDRjwTQA=; b=KqGfDpCD0nbLdb+2mQFqb7IEavkJEYaNHCGFxEjYHjQ4mTCggnXXa2T8VDABXpIr4x BcVs0bqI+8CYgho+WgTgmJq5kyW3gVfRHB6FNUH5R69KX5M1IC+xYek9dTjt6OerUfJr 0dvsWV+5Lc1FuqD+n28ddc6eoG7ZX9KGIm7tnt402I+wbCunu1VJKiUrBAE9mkHvtnGI 45dBfh3wO4xB4VRE0wOqycD6mL2EGpnLgMAkNWFn9tEP+LL191Np5gmMAwcp1UHaL6Cq SyMFVOoc9A5DKMXLVZ3dtnwXIzgG0CFDpQYfCrWN11TENB2TqR3HnecTkjxBjqg0+CnU 4h6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jrmPx2Sf; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l81si1625354iod.116.2017.11.29.09.48.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 09:48:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jrmPx2Sf; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK6RU-0006Xy-H2; Wed, 29 Nov 2017 17:46:40 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK6RU-0006Xs-0Y for xen-devel@lists.xen.org; Wed, 29 Nov 2017 17:46:40 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id F8/0F-03103-F72FE1A5; Wed, 29 Nov 2017 17:46:39 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRWlGSWpSXmKPExsVyMbThoG7dJ7k og61HjSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1oxtb54xFrzkrri1I7uB8S9nFyMXh5DAREaJ T517mEEcFoF2Zol576cxgjgSAu9YJHbveMTWxcgJ5ORJTLj3lqWLkQPITpO4N1kRIlwl8XrHX 3aQsJCAmsSaN1EQQ3uZJDrX7gIrZxPQkVg3oxakXERAWuLa58uMIDazQLzE46nXwaYLCzhKfO u8zw5iswioSry908YCYvMKWEus/v6cHWKVvMSutousExj5FzAyrGJUL04tKkst0rXQSyrKTM8 oyU3MzNE1NDDTy00tLk5MT81JTCrWS87P3cQIDB0GINjBOPuy/yFGSQ4mJVHeTwtlo4T4kvJT KjMSizPii0pzUosPMcpwcChJ8M7+KBclJFiUmp5akZaZAwximLQEB4+SCK8JSJq3uCAxtzgzH SJ1itGe48KdS3+YOA7suQUkn8183cDMMe1qaxOzEEtefl6qlDhvAUibAEhbRmke3FBY1F1ilJ US5mUEOlOIpyC1KDezBFX+FaM4B6OSMG8NyBSezLwSuN2vgM5iAjrr5n5pkLNKEhFSUg2MXWy PWJYUF7xefGxvL4tHRmH8fE8F4cxkrqdJ9X7LWNi2BeTzhT3+b7QlvHTlpNTPnLO7GC7McC2T KTt8dUOXRMPfMJNt75Zk7g+rO+R48IFlzktzrY/nQ1eYzv4j8+2mx5ctCyIWrrm655P/9w0Ti l8yTXG4wbnfb+re794Ob80my+k7mcT/VGIpzkg01GIuKk4EACCJPsq1AgAA X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-11.tower-27.messagelabs.com!1511977598!86929336!1 X-Originating-IP: [209.85.128.193] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31780 invoked from network); 29 Nov 2017 17:46:38 -0000 Received: from mail-wr0-f193.google.com (HELO mail-wr0-f193.google.com) (209.85.128.193) by server-11.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 29 Nov 2017 17:46:38 -0000 Received: by mail-wr0-f193.google.com with SMTP id k61so4169558wrc.4 for ; Wed, 29 Nov 2017 09:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=rrKwSjCbGEVlZ/+A73XYyKsgqgP3WfHEeoEPx1ZuFvM=; b=jrmPx2SfCZkoIyClBNVH3WlFEu+9iHdDGoiA0mcbZU8DoCD5yKcFPAm4BbwdylGs5E xYHwPC/1QSzn3IZkpbDRFUbHI4nX86HVs8S9ut4yjU/ZXjq9ZhbujNGVEB7xVlZqW0Vn PPBSxgL8ezC86VZAG3Lr+QoEg5mkVGyy/yCjE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rrKwSjCbGEVlZ/+A73XYyKsgqgP3WfHEeoEPx1ZuFvM=; b=iEsWFJqqIhxsfx0zVOt+EZpOFOVCpdgu4IwbZ/ALG/x6kKLnYj0Mu2M35NoRAHBS6Q X1YiGe9hlSZj6r0l/rNhH/sG+k74Q7oYR840/aVSWjpCEYOKbYrcBkcxwiC35zxTvVlW +nLedi89lJRURGu/Nr1RagBSqR767qWTUiYNoMRWLX/WJ0EbgeA894M3g9i1PUPo2Eoo I4ICa1UgrxvwI0tD8i4XwxxvmlgsxBYZgT1mgxH1OGbHoSyCQ+GUJan5TPl5GBXLLxom tUJE0hBp+QtdFB34Xs7tqRvg/0+uTsoBLweA6dtLTqetD57dHi129PavL329aLyCb5ax YSSw== X-Gm-Message-State: AJaThX4B6AXqbsLdA+uPanZPBZ3qqVrmBKelNjhi3PplGLfmENU1SEUc xOGTN2K0dsqB4C/tgMsFO9F0UV/EX+0= X-Received: by 10.223.154.43 with SMTP id z40mr3140026wrb.210.1511977598195; Wed, 29 Nov 2017 09:46:38 -0800 (PST) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id q15sm2157698wra.91.2017.11.29.09.46.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 09:46:37 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 29 Nov 2017 17:46:35 +0000 Message-Id: <20171129174635.3462-1-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 Cc: sstabellini@kernel.org, Julien Grall , andre.przywara@linaro.org Subject: [Xen-devel] [PATCH] xen/arm: Surround HSR_SYSREG macro value with () X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The value of the macro HCR_SYSREG is not surrounded by (). This means the behavior may change depend on how it is used. Thanksfully recent GCC will issue a warning for that. Signed-off-by: Julien Grall --- I am not aware of any "bad" usage today in Xen. This was found whilst playing with sysreg emulation and GCC complaining about the missing (). --- xen/include/asm-arm/arm64/sysregs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/include/asm-arm/arm64/sysregs.h b/xen/include/asm-arm/arm64/sysregs.h index 084d2a1e5d..1811234249 100644 --- a/xen/include/asm-arm/arm64/sysregs.h +++ b/xen/include/asm-arm/arm64/sysregs.h @@ -32,11 +32,11 @@ /* These are used to decode traps with HSR.EC==HSR_EC_SYSREG */ #define HSR_SYSREG(op0,op1,crn,crm,op2) \ - ((__HSR_SYSREG_##op0) << HSR_SYSREG_OP0_SHIFT) | \ - ((__HSR_SYSREG_##op1) << HSR_SYSREG_OP1_SHIFT) | \ - ((__HSR_SYSREG_##crn) << HSR_SYSREG_CRN_SHIFT) | \ - ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \ - ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT) + (((__HSR_SYSREG_##op0) << HSR_SYSREG_OP0_SHIFT) | \ + ((__HSR_SYSREG_##op1) << HSR_SYSREG_OP1_SHIFT) | \ + ((__HSR_SYSREG_##crn) << HSR_SYSREG_CRN_SHIFT) | \ + ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \ + ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT)) #define HSR_SYSREG_DCISW HSR_SYSREG(1,0,c7,c6,2) #define HSR_SYSREG_DCCSW HSR_SYSREG(1,0,c7,c10,2)