Message ID | 20180403153251.19595-10-julien.grall@arm.com |
---|---|
State | Accepted |
Commit | 18d12056ccea435dca7fcbe2085fff15bca19046 |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3954173ljb; Tue, 3 Apr 2018 08:35:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/niG9yc0w4+NKooY+hrdrG6LBdJrpnZaAFOR3z3O3eYsQPxGJRgeIj67+C1nrUx+r0JVPc X-Received: by 10.107.139.148 with SMTP id n142mr2957822iod.145.1522769719172; Tue, 03 Apr 2018 08:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522769719; cv=none; d=google.com; s=arc-20160816; b=pAmtMYxi0iomsybtx7FprmtXSBp2J8aiB8QqPSxDR+n8M978iPeV5KOWP8bLxKH+5R ZVRBAAhWDOZ+DAFmRaqFDEEFd03SwP1ZzQn2CPNApezQlQM8lJKyZAojvHnuBSs5IJW5 kEB6KWG/exfPxK+RaTPkNFb1ebssbL2cf/uVdTKoNfytseKgw09/2dLvxtSqjNSQz8Nc qy9TuBK0Y4yRjDoy7ZXWsjGDsuTmNUMMSC7wM7RFw8a//t02Oy5xh2WqNE9Q1EJbGhEc Gq95vhADZXtyZ5t+YF2DFhXyc06xyGLE549rr0SeuAjYM6udREG6SxxRZQbgpGDb8OYl R6Ow== 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:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from :arc-authentication-results; bh=nalveKMfiH7iP1YVjinO/IKKrnftCMrk6XNJfLPXD1s=; b=1K/sHAvjBFrpHR74GtPl/D4CBM9zRS5ul3wf3QlY1r9/no8uvRVkHJLbs2LkbN1eiv Cljjead2e+VqQ6Bus/P+OrgfcCFlQZ7K2XTpAKtN//vjjcVrX/PXei0FbIQQisf5TDKq lKEGYGO28YO9Pmna40OZvZlmjtPY7rk4xNSKzr5zvPtYjhXqMlK+79nLdBZQ6aMG/HHQ gWhhnu8sR398Ko1GYFDwT1zZQxPQye7AjdNFYbM9ZFmknxb1Q6TVymul5P5rt0lzfRAi Z25bhrfTpWGdBsq9LqgDABwDQK38HbVpvndbnDbgPgDPnd7ag6cFVSbeIsfJMyLQzY2S dkNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: <xen-devel-bounces@lists.xenproject.org> Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id o80si2014663ioe.174.2018.04.03.08.35.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Apr 2018 08:35:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1f3Nvx-0007wj-MI; Tue, 03 Apr 2018 15:33:17 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <srs0=ifgk=gy=arm.com=julien.grall@srs-us1.protection.inumbo.net>) id 1f3Nvw-0007vZ-BS for xen-devel@lists.xen.org; Tue, 03 Apr 2018 15:33:16 +0000 X-Inumbo-ID: 7d5304ac-3754-11e8-8249-2fda3a446a53 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 7d5304ac-3754-11e8-8249-2fda3a446a53; Tue, 03 Apr 2018 15:34:25 +0000 (UTC) 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 955AF15AB; Tue, 3 Apr 2018 08:33:14 -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 CB87E3F24A; Tue, 3 Apr 2018 08:33:12 -0700 (PDT) From: Julien Grall <julien.grall@arm.com> To: xen-devel@lists.xen.org Date: Tue, 3 Apr 2018 16:32:44 +0100 Message-Id: <20180403153251.19595-10-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180403153251.19595-1-julien.grall@arm.com> References: <20180403153251.19595-1-julien.grall@arm.com> Subject: [Xen-devel] [for-4.11][PATCH v7 09/16] xen/pdx: Introduce helper to convert MFN <-> PDX X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wei.liu2@citrix.com>, George Dunlap <George.Dunlap@eu.citrix.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>, Julien Grall <julien.grall@arm.com>, Jan Beulich <jbeulich@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> |
Series |
xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN
|
expand
|
diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h index 4c56645c4c..a151aac1a2 100644 --- a/xen/include/xen/pdx.h +++ b/xen/include/xen/pdx.h @@ -35,6 +35,9 @@ static inline unsigned long pdx_to_pfn(unsigned long pdx) ((pdx << pfn_pdx_hole_shift) & pfn_top_mask); } +#define mfn_to_pdx(mfn) pfn_to_pdx(mfn_x(mfn)) +#define pdx_to_mfn(pdx) _mfn(pdx_to_pfn(pdx)) + extern void pfn_pdx_hole_setup(unsigned long); #endif /* HAS_PDX */