From patchwork Thu Jul 28 14:51:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 72987 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp894975qga; Thu, 28 Jul 2016 07:55:05 -0700 (PDT) X-Received: by 10.36.53.83 with SMTP id k80mr39259877ita.59.1469717705244; Thu, 28 Jul 2016 07:55:05 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f188si13460904ioa.233.2016.07.28.07.55.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 07:55:05 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.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 1bSmfQ-0002yf-5B; Thu, 28 Jul 2016 14:52:08 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSmfO-0002uW-S6 for xen-devel@lists.xen.org; Thu, 28 Jul 2016 14:52:06 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id 84/1F-07858-61C1A975; Thu, 28 Jul 2016 14:52:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRWlGSWpSXmKPExsVysyfVTVdMZla 4wcRtQhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aGy/8YC6awVaxd85+lgXEOaxcjF4eQwCZG ie9T7rBBOKcZJe5sWgLkcHKwCWhK3Pn8iQnEFhGQlrj2+TIjSBGzQDujxNr+XuYuRg4OYYF4i eZPbiAmi4CqxJ4JuiAmr4CLxKJesE4JATmJk8cms4KEOYHCr7uFQMJCAs4S02cuZZzAyL2AkW EVo3pxalFZapGuoV5SUWZ6RkluYmaOrqGBmV5uanFxYnpqTmJSsV5yfu4mRqBnGYBgB+PO506 HGCU5mJREecNCZ4YL8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuD1l5oVLiRYlJqeWpGWmQMMMZi0 BAePkgjvQ5A0b3FBYm5xZjpE6hSjLseCH7fXMgmx5OXnpUqJ89aAFAmAFGWU5sGNgIX7JUZZK WFeRqCjhHgKUotyM0tQ5V8xinMwKgnzNoNM4cnMK4Hb9AroCCagI4pjZ4AcUZKIkJJqYNSfGN 9WcEp9d4zZFdfPYbPPaVqrddxawqnenDr53sTuyEX1u97Uy9udEdx42Lagdv6WqrL5xRVzTpw /qpXfvBMYUhXlSRFX+c6Z3OBYd27rrT1cLhO+N+ik78qbeN/kx4Q/Sct2tmzv9EubsX7z46Yj n5NmBc74WP9V5ZN0/uzeKZuOTXR816bEUpyRaKjFXFScCAAWh2NZcgIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1469717525!25533250!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6717 invoked from network); 28 Jul 2016 14:52:06 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-3.tower-21.messagelabs.com with SMTP; 28 Jul 2016 14:52:06 -0000 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 BBB3EBB4; Thu, 28 Jul 2016 07:53:21 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.218.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 881F03F21A; Thu, 28 Jul 2016 07:52:03 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 28 Jul 2016 15:51:32 +0100 Message-Id: <1469717505-8026-10-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469717505-8026-1-git-send-email-julien.grall@arm.com> References: <1469717505-8026-1-git-send-email-julien.grall@arm.com> Cc: proskurin@sec.in.tum.de, Julien Grall , sstabellini@kernel.org, steve.capper@arm.com, wei.chen@linaro.org Subject: [Xen-devel] [RFC 09/22] xen/arm: p2m: Change the type of level_shifts from paddr_t to unsigned int X-BeenThere: xen-devel@lists.xen.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.xen.org Sender: "Xen-devel" The level shift can be encoded with 32-bit. So it is not necessary to use paddr_t (i.e 64-bit). Signed-off-by: Julien Grall --- xen/arch/arm/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index a6dce0c..798faa8 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -675,7 +675,7 @@ static const paddr_t level_sizes[] = { ZEROETH_SIZE, FIRST_SIZE, SECOND_SIZE, THIRD_SIZE }; static const paddr_t level_masks[] = { ZEROETH_MASK, FIRST_MASK, SECOND_MASK, THIRD_MASK }; -static const paddr_t level_shifts[] = +static const unsigned int level_shifts[] = { ZEROETH_SHIFT, FIRST_SHIFT, SECOND_SHIFT, THIRD_SHIFT }; static int p2m_shatter_page(struct p2m_domain *p2m,