From patchwork Fri Feb 23 18:57:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 129496 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp989858edc; Fri, 23 Feb 2018 11:03:49 -0800 (PST) X-Google-Smtp-Source: AH8x227sfAid5Ld3HcdPdz98xccAOiKClNREAXX5tMWmyjM3iuZxbKA0wCjMKWBbXicjFubExLlQ X-Received: by 10.36.60.82 with SMTP id m79mr3493301ita.152.1519412629513; Fri, 23 Feb 2018 11:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519412629; cv=none; d=google.com; s=arc-20160816; b=0OPAr6io40x8AmhXN6QEKCct8ylsqmcCxozW3uF6VICcE4Doekcc1KrIQKv10KOClA fHmIrjFzDtRVfJlmnom8Xa00FWYreE/2TBYqrKCWRL0qjbNJOqFGxnKHYB207nJ8wupV e1wC68mTWnjZBx+whGF8PV08z7PFWJYsDP9fi1u7VTlWzxuRqkKC5rZND4DpVJH8d0q0 ETtd2mdTBTOw2/Ok+q601DudxRS/axylwPFpEp92Rc/Y16198/BE7wM4R6U7LFWFrciI 98a+Bu6k3Qii9eVU16i+GkLfNcuG27u4H9XHa4zKWDUzqQOcgs/VKBpqc+Pb478H7+c3 HHcA== 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=iXMIlbb5R7i958r5o8tW/gx+oFtHbmJfyI4VuVKvGac=; b=GKiQ5bf7eXQBzBcn/eWX3e4DARtfdiNRgXD2d9I0GKxYi2qu09/c3C6cr4AooNGY2e lDC4R6U2dX/2ErBZ5W2khbiU9R0K1hDjeJQK7G1jShSbvQJ3BFd+gLB0ffu+y7xk1oa7 RmmEKcpOy/BTReAEHqqOFdPY7bKAgefEMdXGw1JwRj9FPevXTud/4UpzOyROFS+hbRoo OwrnvgVgqu58bxh4vWksDIj3u2w+XC/jUwySHrYxr5QMBVr308rapbkVtOxtozxS2qVM d3xCrELYZ/icxprz9xNLi/3LS9LLum2hWxv/qR5eGGLsSw4qn9BW9L8rpiLjC88H609u CBow== 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 m27si2376231ioo.216.2018.02.23.11.03.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 11:03:49 -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 1epIbj-0005TR-Ml; Fri, 23 Feb 2018 19:02:11 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epIbi-0005T7-7p for xen-devel@lists.xen.org; Fri, 23 Feb 2018 19:02:10 +0000 X-Inumbo-ID: abcc582b-18cb-11e8-b9b1-635ca7ef6cff Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id abcc582b-18cb-11e8-b9b1-635ca7ef6cff; Fri, 23 Feb 2018 18:59:27 +0000 (UTC) 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 09FE180D; Fri, 23 Feb 2018 10:57:44 -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 CB1463F25C; Fri, 23 Feb 2018 10:57:42 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Fri, 23 Feb 2018 18:57:16 +0000 Message-Id: <20180223185729.8780-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223185729.8780-1-julien.grall@arm.com> References: <20180223185729.8780-1-julien.grall@arm.com> Cc: Volodymyr Babchuk , Julien Grall , sstabellini@kernel.org, volodymyr_babchuk@epam.com, andre.przywara@linaro.org Subject: [Xen-devel] [PATCH v5 05/18] 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 Acked-by: Stefano Stabellini --- Changes in v4: - Add Stefano's acked-by Changes in v2: - Add Volodymyr's reviewed-by --- 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 2951caa49d..30208d12ca 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.