From patchwork Mon Feb 5 13:20:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 126865 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1967427ljc; Mon, 5 Feb 2018 05:22:45 -0800 (PST) X-Google-Smtp-Source: AH8x226KpL+8s0ripfWiCap/KonjgWCAoKRX7TnfnWuDjTTlxSDTERdNj4RsXsCE6XZ5zBX6y9+X X-Received: by 10.36.222.2 with SMTP id d2mr26665906itg.1.1517836965609; Mon, 05 Feb 2018 05:22:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517836965; cv=none; d=google.com; s=arc-20160816; b=ah7xjHKtBMOnBj2YH/1iSN/6jbrdlxW21NBUoQOzWfZ898PJha7u2vEdlLHJ6t7rEO XmNTFoaaM6tPFzxlH93J7tPTiQFfCXX7SN3QPsBRag8sepcczPDNnZdhBPEJy6Oes4By 7+CtNOs2uBOsznP/yWi2ELCR7FeO5dMFctg98KbQxLtpqAa9CPrormd6/2I5cfbcWfGp dS2JdBpaqqR1al7w8+lmKJ2W4uErrHCz/tkavMcOdUOu7Q4kBI+iF7ohNqA5bn6nBJCQ w78/kIx1sK75yjef0DxSgCaw2YDTOdi2QAQjqAh5qT/qF2SZmkVKbO0qTxQ+x3q3msR+ IiBw== 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:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=NQK1J4JW12O0kEyAO4mNue4s7XmZO22ibxgIsPTagYw=; b=xxQGVsAsKw3+ESwQBh+AoaZqH18zMpCTJrp78RjJybYO7gwhX90UJUDWz9TIZOmmkX M5d4SUk9ihN4aOOdUpg0BN7wn34z0P78q/0KEhbK/uj+RRnu/M1ayn5KnCbS07PG/aRJ VbdXZ2OloOkdyd6QyOCtddgORiv6wJj4XPVsTozz8YWi3INmUVIh3Zw/BQ+T7EtW7vbZ FjkiQk4Z+XGBETEYY0Qj19CbAR5iZyGKcigNrIk2x3u4hGmJsQFxp5kUzvh7L3Qh2g6N LyWw2bdb13ocoYlNmhW0Wfmma4fw2rjT7Qj71oahRepzpcPL4aRVbJSpPPUiSipL7etB 5sBg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id w191si1207910itc.130.2018.02.05.05.22.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2018 05:22:45 -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; 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 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eighB-0007Md-KA; Mon, 05 Feb 2018 13:20:29 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eigh9-0007LW-9K for xen-devel@lists.xen.org; Mon, 05 Feb 2018 13:20:27 +0000 X-Inumbo-ID: 46f05d85-0a77-11e8-ba59-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 46f05d85-0a77-11e8-ba59-bc764e045a96; Mon, 05 Feb 2018 14:20:04 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 054621529; Mon, 5 Feb 2018 05:20:26 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 19B7D3F24D; Mon, 5 Feb 2018 05:20:24 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 5 Feb 2018 13:20:08 +0000 Message-Id: <20180205132011.27996-7-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205132011.27996-1-julien.grall@arm.com> References: <20180205132011.27996-1-julien.grall@arm.com> Cc: Julien Grall , sstabellini@kernel.org, andre.przywara@linaro.org Subject: [Xen-devel] [PATCH 6/7] xen/arm: Adapt smccc.h to be able to use it in assembly code 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" Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk --- xen/include/asm-arm/smccc.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/xen/include/asm-arm/smccc.h b/xen/include/asm-arm/smccc.h index b790fac17c..d24ccb51d8 100644 --- a/xen/include/asm-arm/smccc.h +++ b/xen/include/asm-arm/smccc.h @@ -25,18 +25,20 @@ * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html */ -#define ARM_SMCCC_STD_CALL 0U -#define ARM_SMCCC_FAST_CALL 1U +#define ARM_SMCCC_STD_CALL _AC(0,U) +#define ARM_SMCCC_FAST_CALL _AC(1,U) #define ARM_SMCCC_TYPE_SHIFT 31 -#define ARM_SMCCC_CONV_32 0U -#define ARM_SMCCC_CONV_64 1U +#define ARM_SMCCC_CONV_32 _AC(0,U) +#define ARM_SMCCC_CONV_64 _AC(1,U) #define ARM_SMCCC_CONV_SHIFT 30 -#define ARM_SMCCC_OWNER_MASK 0x3FU +#define ARM_SMCCC_OWNER_MASK _AC(0x3F,U) #define ARM_SMCCC_OWNER_SHIFT 24 -#define ARM_SMCCC_FUNC_MASK 0xFFFFU +#define ARM_SMCCC_FUNC_MASK _AC(0xFFFF,U) + +#ifndef __ASSEMBLY__ /* Check if this is fast call. */ static inline bool smccc_is_fast_call(register_t funcid) @@ -62,6 +64,8 @@ static inline uint32_t smccc_get_owner(register_t funcid) return (funcid >> ARM_SMCCC_OWNER_SHIFT) & ARM_SMCCC_OWNER_MASK; } +#endif + /* * Construct function identifier from call type (fast or standard), * calling convention (32 or 64 bit), service owner and function number.