From patchwork Mon Jun 19 16:57:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9796837 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 5D49F600C5 for ; Mon, 19 Jun 2017 17:00:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45D6B281F9 for ; Mon, 19 Jun 2017 17:00:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B0712833C; Mon, 19 Jun 2017 17:00:21 +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 104DB27F8F for ; Mon, 19 Jun 2017 17:00:20 +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 1dN00F-0003su-Rw; Mon, 19 Jun 2017 16:58:15 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dN00E-0003pe-9T for xen-devel@lists.xen.org; Mon, 19 Jun 2017 16:58:14 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id 58/4E-23755-5A208495; Mon, 19 Jun 2017 16:58:13 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRWlGSWpSXmKPExsVysyfVTXcJk0e kwcRnVhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bCsz2sBQ9VKtqudDA3MG6S7mLk4hAS2MQo MWn9XDYI5zSjxOmb/1m6GDk52AQ0Je58/sQEYosISEtc+3yZsYuRg4NZIEri/zROEFNYwEnix 04tkAoWAVWJFbtegnXyClhJfGk9C9YpISAvsavtIiuIzQkU/z7/GiOILSRgKXH8yS22CYzcCx gZVjGqF6cWlaUW6ZrpJRVlpmeU5CZm5ugaGhjr5aYWFyemp+YkJhXrJefnbmIE+raegYFxB+O VNudDjJIcTEqivLP+u0cK8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuDdxOgRKSRYlJqeWpGWmQMM Mpi0BAePkghvzW+gVt7igsTc4sx0iNQpRkUpcd6TIH0CIImM0jy4NlhgX2KUlRLmZWRgYBDiK Ugtys0sQZV/xSjOwagkzPsUZApPZl4J3PRXQIuZgBYzn3EBWVySiJCSamD0jd/zqL/71exU1q ZPFWcnH0yZ6L097Ud6UjpDy8LQa+HprUmdl6TKitg9b0ZOu/tKeErchIpHPXNEpl0s8n728cm iJTyS/13K16rL5u6enBaYv/ucR9ccg6KXmqLLLvAzWPg3rWWp93O4kiK+0Cpavmjv342f0w8I KOxhPFBte/ZQdvZxjbVKLMUZiYZazEXFiQAy28JoZwIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1497891492!48279978!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 40852 invoked from network); 19 Jun 2017 16:58:12 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-4.tower-31.messagelabs.com with SMTP; 19 Jun 2017 16:58:12 -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 04E8B344; Mon, 19 Jun 2017 09:58:12 -0700 (PDT) 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 2E63B3F41F; Mon, 19 Jun 2017 09:58:11 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 19 Jun 2017 17:57:48 +0100 Message-Id: <20170619165753.25049-12-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619165753.25049-1-julien.grall@arm.com> References: <20170619165753.25049-1-julien.grall@arm.com> Cc: proskurin@sec.in.tum.de, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH v2 11/16] xen/arm: lpae: Fix comments coding style 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 Also adding one missing full stop + fix description Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Cc: proskurin@sec.in.tum.de I haven't retained Stefano's reviewed-by because of the description update. Changes in v2: - Fix description regarding x86 page-table --- xen/include/asm-arm/lpae.h | 49 ++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/xen/include/asm-arm/lpae.h b/xen/include/asm-arm/lpae.h index ad8c571ea5..aa85cb8112 100644 --- a/xen/include/asm-arm/lpae.h +++ b/xen/include/asm-arm/lpae.h @@ -3,10 +3,12 @@ #ifndef __ASSEMBLY__ -/* WARNING! Unlike the Intel pagetable code, where l1 is the lowest - * level and l4 is the root of the trie, the ARM pagetables follow ARM's - * documentation: the levels are called first, second &c in the order - * that the MMU walks them (i.e. "first" is the root of the trie). */ +/* + * WARNING! Unlike the x86 pagetable code, where l1 is the lowest level and + * l4 is the root of the trie, the ARM pagetables follow ARM's documentation: + * the levels are called first, second &c in the order that the MMU walks them + * (i.e. "first" is the root of the trie). + */ /****************************************************************************** * ARMv7-A LPAE pagetables: 3-level trie, mapping 40-bit input to @@ -17,15 +19,18 @@ * different place from those in leaf nodes seems to be to allow linear * pagetable tricks. If we're not doing that then the set of permission * bits that's not in use in a given node type can be used as - * extra software-defined bits. */ + * extra software-defined bits. + */ typedef struct __packed { /* These are used in all kinds of entry. */ unsigned long valid:1; /* Valid mapping */ unsigned long table:1; /* == 1 in 4k map entries too */ - /* These ten bits are only used in Block entries and are ignored - * in Table entries. */ + /* + * These ten bits are only used in Block entries and are ignored + * in Table entries. + */ unsigned long ai:3; /* Attribute Index */ unsigned long ns:1; /* Not-Secure */ unsigned long user:1; /* User-visible */ @@ -38,30 +43,38 @@ typedef struct __packed { unsigned long long base:36; /* Base address of block or next table */ unsigned long sbz:4; /* Must be zero */ - /* These seven bits are only used in Block entries and are ignored - * in Table entries. */ + /* + * These seven bits are only used in Block entries and are ignored + * in Table entries. + */ unsigned long contig:1; /* In a block of 16 contiguous entries */ unsigned long pxn:1; /* Privileged-XN */ unsigned long xn:1; /* eXecute-Never */ unsigned long avail:4; /* Ignored by hardware */ - /* These 5 bits are only used in Table entries and are ignored in - * Block entries */ + /* + * These 5 bits are only used in Table entries and are ignored in + * Block entries. + */ unsigned long pxnt:1; /* Privileged-XN */ unsigned long xnt:1; /* eXecute-Never */ unsigned long apt:2; /* Access Permissions */ unsigned long nst:1; /* Not-Secure */ } lpae_pt_t; -/* The p2m tables have almost the same layout, but some of the permission - * and cache-control bits are laid out differently (or missing) */ +/* + * The p2m tables have almost the same layout, but some of the permission + * and cache-control bits are laid out differently (or missing). + */ typedef struct __packed { /* These are used in all kinds of entry. */ unsigned long valid:1; /* Valid mapping */ unsigned long table:1; /* == 1 in 4k map entries too */ - /* These ten bits are only used in Block entries and are ignored - * in Table entries. */ + /* + * These ten bits are only used in Block entries and are ignored + * in Table entries. + */ unsigned long mattr:4; /* Memory Attributes */ unsigned long read:1; /* Read access */ unsigned long write:1; /* Write access */ @@ -73,8 +86,10 @@ typedef struct __packed { unsigned long long base:36; /* Base address of block or next table */ unsigned long sbz3:4; - /* These seven bits are only used in Block entries and are ignored - * in Table entries. */ + /* + * These seven bits are only used in Block entries and are ignored + * in Table entries. + */ unsigned long contig:1; /* In a block of 16 contiguous entries */ unsigned long sbz2:1; unsigned long xn:1; /* eXecute-Never */