From patchwork Fri Feb 23 16:47:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 129460 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp813938lja; Fri, 23 Feb 2018 08:50:10 -0800 (PST) X-Google-Smtp-Source: AG47ELuZZyl79nDRCV2nB3/CtM4kqIMnNKRTSdYduQTo/0ejGjGQStppRnfdvq/pLB37DzBjZdue X-Received: by 10.36.246.135 with SMTP id u129mr3047270ith.116.1519404610793; Fri, 23 Feb 2018 08:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519404610; cv=none; d=google.com; s=arc-20160816; b=hU7gxoe155PWaooks/sIyNZdZYVlSpl5l5OwIxXi/IYLTPRqi+mZcNHfe25HGOiSUv QIfVPaWHcaZSVNKcrbnoopOMzJG6vRY1KqWBfvgIDrjd0EZmpreAO1SQy2esJZOBWWFP mp0jCY6FomG7WZGPfuJvl0yHvRRN8a6RGBczMZQqO3EOIuq2aORR2OzexG6wa0BxXMBA iwiNjR/Nn5j00jRQx2T12D8skTVSFqwGv4t82PHIx8ZEC4syo7M6jVyxY+AFHxmfsC5o m3qTDrw1t9yg/Upt8DiXLQRBHvWvo0tNCppN6epuYArVVLi9Jfz+8VUsAOaL5zKGhG8V 0zgQ== 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=ui38ZTSBSwdNrVzFTcMb8XuNwa/aTlkPDgfwMP9qFxxjz/mnDWTAT63+0Fbx/onWEs jisQYlYn2ni4BcMgiqXr8JntCiuhGK4Olqq3NLh0v98udeeGeTmq3nxiXHIsRFm5qW0D ar89VkPOyIzDrN7Lg2GWuFKzF+mTtiPXgceRqUMSXmGOTIMDkNC7XaR0R9XIbIyqAt8J gts9YK8Xkn6I4JhCfwUisshUbQccEnMxB6+emygTHqJlGryDvYKfeAFtB/IQ8ojOJ/VY YyuTUOdpTtFyNjPXiI/+RTXzJuUnc70FkdCPb/jYz5JcT+hfbuGRwed5dVhNG28QnOL6 sIeg== 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 i4si1412298ite.158.2018.02.23.08.50.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 08:50:10 -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 1epGW7-0003RU-H9; Fri, 23 Feb 2018 16:48:15 +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 1epGW5-0003Qg-Lr for xen-devel@lists.xen.org; Fri, 23 Feb 2018 16:48:13 +0000 X-Inumbo-ID: 380fc8e4-18b9-11e8-ba59-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 380fc8e4-18b9-11e8-ba59-bc764e045a96; Fri, 23 Feb 2018 17:47:22 +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 5E84A15AD; Fri, 23 Feb 2018 08:48:12 -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 2BE973F25C; Fri, 23 Feb 2018 08:48:11 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Fri, 23 Feb 2018 16:47:39 +0000 Message-Id: <20180223164753.27311-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223164753.27311-1-julien.grall@arm.com> References: <20180223164753.27311-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 v4 05/19] 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.