From patchwork Tue Jun 13 16:13:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 105385 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp486321qgd; Tue, 13 Jun 2017 09:15:12 -0700 (PDT) X-Received: by 10.36.58.145 with SMTP id m139mr17566604itm.34.1497370512504; Tue, 13 Jun 2017 09:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497370512; cv=none; d=google.com; s=arc-20160816; b=npeR7BQ1Az5py2NUi6KVjMwY5+xO/rG6SSWELzmfUpWJMLGBZJ5sXHg69CaQULwh0c Jkj3McKlKQDVC1ujdQYPjq5sv2htPzddEWbfkcX1fFUEgVi5O4m5n8uf1SwnlGfpQgmm XedofTw8YIT++6psPzy5wNOe9kpSCErh3JxRzcsggBrm8pycTnh+hS5QvVok/IN0p1aG nCYRh56UKine+pqLUMQZV7mlVuJfVGqIQHmreGgUH2L8YVbaruNS2bHipWbr139tIals 8kOvnU+o1MpktIIe6Ktr091WuPcOr7I+vrOYGhQO6dYDMO+NaEzxY3lQkO+jcwNu0Tvt qCdQ== 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=hyDL7b8/Xxat6k83fH79bH1NujDa4z7GlsMsUfv2gfM=; b=PADbbrvdBlm7ovMJ+NDL/yFww6V1ATkC2ogUc/ipu/Y9Hq1qSoDPlN2zEWGHaTx8rY CaaGqd5pke02qcsuVnxpYuJoioUAg6fppvRG2hDN1K6GzfoOssrGw/MVdYvvvDZkJJNL R0Njze4XtjNvfQd4ktpQ4Vq8QIEUzyCheQSuFWUmLSEjtwtTBpgzTDlYH2uQAAQZ0Wa0 gQwhZgA7NTpB6RDCiRO29qwlpIFSTFIngtiwccO9+VmDKs7mIAVwJP8lSMPQE28X2Pp7 bKSH4DaqLkTM2MtPJ8n5RiwcQfPHy2CdoNPH7za9yhIKbUz6i2LO8ghDpd5lozvn6w3U j/oQ== 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 o24si421051ioi.146.2017.06.13.09.15.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 09:15:12 -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 1dKoS2-0008Ra-Gs; Tue, 13 Jun 2017 16:13:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKoS0-0008Nw-T2 for xen-devel@lists.xen.org; Tue, 13 Jun 2017 16:13:53 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 70/2B-26749-04F00495; Tue, 13 Jun 2017 16:13:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRWlGSWpSXmKPExsVysyfVTdee3yH SoPuBiMWSj4tZHBg9ju7+zRTAGMWamZeUX5HAmnFwWXnBYfaK671n2RsYf7N2MXJyCAlsZpRo nVnQxcgFZJ9mlDhw+hA7SIJNQFPizudPTCC2iIC0xLXPlxlBbGaBCImmBXvB4sICLhJHJq0Gq ufgYBFQleg/aAsS5hWwkrh+4z9YiYSAvMSutotguziB4peeNzFC7LWUaN69nmkCI/cCRoZVjO rFqUVlqUW6FnpJRZnpGSW5iZk5uoYGxnq5qcXFiempOYlJxXrJ+bmbGIGeZQCCHYwX2p0PMUp yMCmJ8m65YhMpxJeUn1KZkVicEV9UmpNafIhRhoNDSYLXns8hUkiwKDU9tSItMwcYYjBpCQ4e JRHe+yxAad7igsTc4sx0iNQpRl2Opg9bvjAJseTl56VKifP+4QUqEgApyijNgxsBC/dLjLJSw ryMQEcJ8RSkFuVmlqDKv2IU52BUEuZt4QGawpOZVwK36RXQEUxAR1wHuZ+3uCQRISXVwFjeuj CiLFhpg3B44IS6r/r7H5ncNtWri9/3/EXOeWexE6E7Yi4cyy6TL9StVd7euGpuSFdi6qdlDgq xE5tmFBmrsdtwmmQlRv7zK3w8kXN6RFld8svmh89X/G1X/br8la+4n5rAul+t0V/OCE7p/GKy MPff24vH/x5Lv+bF4tk7VcZV4LXcbyWW4oxEQy3mouJEADVhco5yAgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-16.tower-31.messagelabs.com!1497370430!97858229!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 11115 invoked from network); 13 Jun 2017 16:13:51 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-16.tower-31.messagelabs.com with SMTP; 13 Jun 2017 16:13:51 -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 5FCEB1596; Tue, 13 Jun 2017 09:13:50 -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 9BD2D3F557; Tue, 13 Jun 2017 09:13:49 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Tue, 13 Jun 2017 17:13:17 +0100 Message-Id: <20170613161323.25196-19-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 18/24] xen/arm: mm: Use typesafe MFN in dump_pt_walk 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" Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 8573192e3a..452c1e26c3 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -181,7 +181,7 @@ void dump_pt_walk(paddr_t ttbr, paddr_t addr, unsigned int nr_root_tables) { static const char *level_strs[4] = { "0TH", "1ST", "2ND", "3RD" }; - const unsigned long root_pfn = paddr_to_pfn(ttbr); + const mfn_t root_mfn = maddr_to_mfn(ttbr); const unsigned int offsets[4] = { zeroeth_table_offset(addr), first_table_offset(addr), @@ -215,7 +215,7 @@ void dump_pt_walk(paddr_t ttbr, paddr_t addr, else root_table = 0; - mapping = map_domain_page(_mfn(root_pfn + root_table)); + mapping = map_domain_page(mfn_add(root_mfn, root_table)); for ( level = root_level; ; level++ ) {