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: 105897 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp942454obh; Mon, 19 Jun 2017 09:59:59 -0700 (PDT) X-Received: by 10.36.65.18 with SMTP id x18mr23751105ita.88.1497891599151; Mon, 19 Jun 2017 09:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497891599; cv=none; d=google.com; s=arc-20160816; b=qELAQK7dpcZz+4KCbhy0NenntjaKBsX1tk6pptlCelGISd+wOphlnXtM8MhcLiiK/m LBFOT+JvviKEmj7dkH+chUulEonMxt+kbYb9FwoCWexETVF8AxVvl4/ghia/f2w1UJTG PkUWv16UMAEw2vktF9bHgRip7EOPSOVRlXOTu7By+JnEXMq2DXmsHWFqKrEQcBYwsPaO 8ynmHtcd20Q3NxlgMWSX4EIHvDZ1Pdj2Chy6oA3yJOKJAJOx9Zt43qfztoxrBP7FpOPX 6gatHXiP8x5Th255p18cZucMcat3GyZ0S4TUHwonihbWk7KcunOn7hgaQQR+76mNKvab vC4Q== 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=RgFDMBSHO3uB7QI7/RCurRbuBPclaZr9VC402eFTTDA=; b=krVTOUEF7zadtTkZ3mB9Eujqv534jkltsTFXTtQk8P1fp7oO0WRH5ZVXL8ce+Me7zK whiJo1XEDUPJ5dcQnow5zyCLYmNwRn1bHiY1Lhm6dudvyLfewP5Yg1sd0tNxR9wJT3yP iS57tZ971xAbxGyVwnYGQueKqmFFyiXA+V6eKVqwmbcAGFnLyu8MsYdqNHMTElVbnzWW groAY/l1Gjtjd5QJofMs1DsdrktjHW+k5o3E5Zq/enDba4n6ojcEIxEEhrYAc+CQlE6w yzVcffFEAzP2QhvNDw1syAHXZybHgYPQtIl58rI3gcFdZNtixX3ul7uSnplW9PUzii1b 1QeA== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 67si10337519ioq.41.2017.06.19.09.59.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 09:59:59 -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 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" 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 */