From patchwork Tue Jun 13 16:13:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 105400 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp486519qgd; Tue, 13 Jun 2017 09:15:35 -0700 (PDT) X-Received: by 10.202.87.84 with SMTP id l81mr525458oib.216.1497370535691; Tue, 13 Jun 2017 09:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497370535; cv=none; d=google.com; s=arc-20160816; b=XiEZfQlPQT8dmFfs2lqGSKAjfDdhZsYs5hYcNubbZtGty+B77jY0IlFgk7VIcXkq9d I+zvAMusE9Enokli3Ta03l3Qc22gS58kDcYWRS1H+/oyd+BB36/pWGU+5O/uBZen8s1j BbSnaEcjEv9+kMp7MaZkNFr+HAb9OSrYQXaloh5fP7IXeppCcEREEt2fcUyYM+36uvUg HshnZW5PpAFuhGlAiN1KLShYwboyZQMvwU8GlhxQQ685mwMeoE0VOky1mh86Ce0P2722 +jwJXFY4BvEi9hDuaWOsj+vWL1MSw3/YHVrY/2ipCpQQ+7UUOEL+5qI+x2RrnWwRbI72 oK8g== 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=d18z22PlWt4cd57WKgzi5W6F6/VEA/lBruUCti0+a1A=; b=TB4rx3wBscznN6PZTgugrwK6N4iQtsE11auKzBfIbTd1rr7Mj9L9okpyOUNctKEEO0 ehv7BhrhMEg5JfAcWjNTwNRwMIiBA2a/67t+PMO2HURjaA5xpb3mS2Qc8AbvrDVjECTQ 9Deule3nG1dFjqS0gvmVdjRJ/bhboVi4T9eoC53OYuKVdtvtC58hGmBAivlnHjel4i4W pdqT7MEfFJsCdAgbGXm7oeDYdVNi7mP9EMV2k0c9BhJwzL3Zjk5Edkmg8kWXLboSgJV0 gEKPxEz5x2A+l9H+m4G/IwsCb+EnMkGc446Fcgum0IQ13WwmZN+/YwqU6hnd7cwe4hUe d3aA== 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 a19si238461oth.317.2017.06.13.09.15.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 09:15:35 -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 1dKoRs-00089z-T6; Tue, 13 Jun 2017 16:13:44 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKoRr-00087f-4H for xen-devel@lists.xen.org; Tue, 13 Jun 2017 16:13:43 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 60/86-01752-63F00495; Tue, 13 Jun 2017 16:13:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVysyfVTdeI3yH SYGeDocWSj4tZHBg9ju7+zRTAGMWamZeUX5HAmvHh8XrWgpuCFXsaj7E3MK7i7WLk4hAS2Mwo cePDDyYI5zSjxKrVb5m7GDk52AQ0Je58/sQEYosISEtc+3yZEcRmFoiQaFqwFywuLOAh0Tz5N BuIzSKgKtFwvx/M5hWwlNj6aR3YHAkBeYldbRdZQWxOASuJS8+bwOYIAdU0717PNIGRewEjwy pGjeLUorLUIl0jM72kosz0jJLcxMwcXUMDU73c1OLixPTUnMSkYr3k/NxNjEAP1zMwMO5gvD3 Z7xCjJAeTkijvlis2kUJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeHfwOkQKCRalpqdWpGXmAEMN Ji3BwaMkwnufBSjNW1yQmFucmQ6ROsWoKCXO2wzSJwCSyCjNg2uDhfclRlkpYV5GBgYGIZ6C1 KLczBJU+VeM4hyMSsK8LTxAU3gy80rgpr8CWswEtPg6yM28xSWJCCmpBsYFDWJP8u/cLvqrEj O/YEXHF/WdFzabJ3OlWB/IXcaz51avGuPP9uVmtcaMTH5PVrSyHVp57/XEg9or7l7P+XDp8J5 Xy42zkkMd5K6wrFTfO5eF9cZVz55Z7hVK8zg8VKQ+5blGvD/52nPHR7cZZ/rn1E+VY7GLtXPr 8A5cf/NXj5vP7Vk74+YpsRRnJBpqMRcVJwIAYWGfyWoCAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-2.tower-206.messagelabs.com!1497370418!82613426!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 50933 invoked from network); 13 Jun 2017 16:13:38 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-2.tower-206.messagelabs.com with SMTP; 13 Jun 2017 16:13:38 -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 0611B1596; Tue, 13 Jun 2017 09:13:38 -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 3F4853F557; Tue, 13 Jun 2017 09:13:37 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Tue, 13 Jun 2017 17:13:05 +0100 Message-Id: <20170613161323.25196-7-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613161323.25196-1-julien.grall@arm.com> References: <20170613161323.25196-1-julien.grall@arm.com> Cc: Julien Grall , sstabellini@kernel.org, punit.agrawal@arm.com Subject: [Xen-devel] [PATCH 06/24] xen/arm: mm: Fix coding style of mfn_to_xen_entry 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" Fix the comment coding style and add a newline before the return. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/mm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 587a6b3975..6f63e4315a 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -254,9 +254,11 @@ void dump_hyp_walk(vaddr_t addr) dump_pt_walk(ttbr, addr, HYP_PT_ROOT_LEVEL, 1); } -/* Standard entry type that we'll use to build Xen's own pagetables. +/* + * Standard entry type that we'll use to build Xen's own pagetables. * We put the same permissions at every level, because they're ignored - * by the walker in non-leaf entries. */ + * by the walker in non-leaf entries. + */ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr) { paddr_t pa = ((paddr_t) mfn) << PAGE_SHIFT; @@ -274,10 +276,12 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr) .xn = 1, /* No need to execute outside .text */ .avail = 0, /* Reference count for domheap mapping */ }};; - /* Setting the User bit is strange, but the ATS1H[RW] instructions + /* + * Setting the User bit is strange, but the ATS1H[RW] instructions * don't seem to work otherwise, and since we never run on Xen * pagetables in User mode it's OK. If this changes, remember - * to update the hard-coded values in head.S too */ + * to update the hard-coded values in head.S too. + */ switch ( attr ) { @@ -298,7 +302,8 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr) break; case UNCACHED: case DEV_SHARED: - /* Shareability is ignored for non-Normal memory, Outer is as + /* + * Shareability is ignored for non-Normal memory, Outer is as * good as anything. * * On ARMv8 sharability is ignored and explicitly treated as Outer @@ -314,8 +319,9 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr) ASSERT(!(pa & ~PAGE_MASK)); ASSERT(!(pa & ~PADDR_MASK)); - // XXX shifts + /* XXX shifts */ e.bits |= pa; + return e; }