From patchwork Thu Sep 15 11:28:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9333203 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BDC4F6077F for ; Thu, 15 Sep 2016 11:30:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC075295BA for ; Thu, 15 Sep 2016 11:30:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A03C0295D1; Thu, 15 Sep 2016 11:30:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4FFB3295BA for ; Thu, 15 Sep 2016 11:30:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkUqr-0004tf-P0; Thu, 15 Sep 2016 11:29:09 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkUqq-0004qZ-K9 for xen-devel@lists.xen.org; Thu, 15 Sep 2016 11:29:08 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id 7C/E9-04595-3068AD75; Thu, 15 Sep 2016 11:29:07 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVysyfVTZe57Va 4wc0DfBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8ai/nXsBQs5KxZ+6GJsYLzJ3sXIxSEksIlR 4vHqxywQzmlGid9ne5m6GDk52AQ0Je58/gRmiwhIS1z7fJkRpIhZoJ1RYm1/LzNIQlggTuL62 WVgNouAqkTH1TtgNq+Aq8SX1uUsILaEgJzEyWOTWbsYOTg4geJLnouChIUEXCSOndjJNoGRew EjwypGjeLUorLUIl1jQ72kosz0jJLcxMwcXUMDM73c1OLixPTUnMSkYr3k/NxNjEAPMwDBDsa mRYGHGCU5mJREed3SboUL8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuDd1wKUEyxKTU+tSMvMAYYa TFqCg0dJhJcdJM1bXJCYW5yZDpE6xagoJQ7RJwCSyCjNg2uDhfclRlkpYV5GoEOEeApSi3IzS 1DlXzGKczAqCfMeAZnCk5lXAjf9FdBiJqDFW9ZcB1lckoiQkmpgzF1azyW7LZFDYQGnq+4zj9 Xh8Zoh++qEbn8/q/yy4bZuQjHXYtG9i7PO+nDNEJaxyjJ9Ey/3+Jy6Zq1pUI5hiLatQf7t7oW L1SsP7tz/ZImU3TrHHdsXdmx7qL7GMjNPfb/6sY1abixMj8vz5t/l+9iflduXzMcV5rd/vdxM 9io3RVvfhRZKLMUZiYZazEXFiQDv9zB5agIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1473938946!59433394!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.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 63035 invoked from network); 15 Sep 2016 11:29:07 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-9.tower-27.messagelabs.com with SMTP; 15 Sep 2016 11:29:07 -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 86E2E80A; Thu, 15 Sep 2016 04:29:06 -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 833083F251; Thu, 15 Sep 2016 04:29:05 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 15 Sep 2016 12:28:31 +0100 Message-Id: <1473938919-31976-16-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473938919-31976-1-git-send-email-julien.grall@arm.com> References: <1473938919-31976-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] [for-4.8][PATCH v2 15/23] xen/arm: p2m: Make p2m_{valid, table, mapping} helpers inline 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" X-Virus-Scanned: ClamAV using ClamSMTP Those helpers are very small and often used. Let know the compiler they can be inlined. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Changes in v2: - Add Stefano's reviewed-by --- xen/arch/arm/p2m.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index fa58f1a..9f0f896 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -39,7 +39,7 @@ static const uint8_t level_shifts[] = static const uint8_t level_orders[] = { ZEROETH_ORDER, FIRST_ORDER, SECOND_ORDER, THIRD_ORDER }; -static bool_t p2m_valid(lpae_t pte) +static inline bool_t p2m_valid(lpae_t pte) { return pte.p2m.valid; } @@ -48,11 +48,11 @@ static bool_t p2m_valid(lpae_t pte) * the table bit and therefore these would return the opposite to what * you would expect. */ -static bool_t p2m_table(lpae_t pte) +static inline bool_t p2m_table(lpae_t pte) { return p2m_valid(pte) && pte.p2m.table; } -static bool_t p2m_mapping(lpae_t pte) +static inline bool_t p2m_mapping(lpae_t pte) { return p2m_valid(pte) && !pte.p2m.table; }