Message ID | 20180321044737.20794-10-julien.grall@arm.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1696551ljb; Tue, 20 Mar 2018 21:50:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELutBuYaKHLr4258TQHJx0Sh3WgXa5ujoQY9mruQ34piv2uDw+Snfkqc1cpAQ1a2yJHVF6tM X-Received: by 2002:a24:c281:: with SMTP id i123-v6mr518075itg.146.1521607818290; Tue, 20 Mar 2018 21:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521607818; cv=none; d=google.com; s=arc-20160816; b=ylSHI+5xttVRZsa0jP9EzKqSMN4l5pWqads9SjAYK7FZA9yNNaaDrnfiubDX6EpUUi ZdiPiUlSzEQQFZ9QZoysgebrfs/av4o1dpZ1D5drO3LtVAtKywRectQOukOl2IP6n2DS tK3h2lZVP26hi1XV03prNW3pquV3oXyYjDXzzwG1Fl+g3SLJGF+FEjk5BY0TuBhIQBEn upcVbDuvGUpUnXZOi7YshHeVYmpAbXHly44Qx1bzzB10KWnZZwbw0TDjMtp/na5KVRy7 SRm9OvTuxCUxzvqoL6bJhoCtSllP51++EGNfRvmn4137TIKMIXM+VeI6S4zdlzY2Bw/I fwdw== 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=wUMIho7uF3uKE2mjMNVM4TqSnRQzlfbkVKlzd1yhe7+oUg1Z3uEYDQOOOiUBSNF5zM ZVBermaw9NYbg46/HBzhBiLrVYYs1N8COTbkGc4ZhZ4uzOCvVhIi0PerOf1GghbFTtH5 dknY5yhh7N+/HAJfif2fBvjq5E9IU8cHdAr8DakOoJHHa3Unx+YypyX/MTyXkqcad826 LwkKaNsZKp2n3AO08Uyl9fy4CSNpWIF+/r5Nw+0j7u2Qhb2Qkt/2i0FrzBHcw7Z2pKo4 4yjMZ05TYGCfNPmqoNioIYKnkB3+voo5DB4rbqy4Vr4eefpxOPo8LbSKSG2YqijRjmZm qCcA== 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 i197-v6si2447962ite.127.2018.03.20.21.50.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Mar 2018 21:50:18 -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 1eyVfS-0006q8-4l; Wed, 21 Mar 2018 04:48:06 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <srs0=kbl4=gl=arm.com=julien.grall@srs-us1.protection.inumbo.net>) id 1eyVfR-0006pQ-8C for xen-devel@lists.xen.org; Wed, 21 Mar 2018 04:48:05 +0000 X-Inumbo-ID: 1b56cc51-2cc3-11e8-8248-2fda3a446a53 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 1b56cc51-2cc3-11e8-8248-2fda3a446a53; Wed, 21 Mar 2018 04:48:32 +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 6DA9C15B2; Tue, 20 Mar 2018 21:48:04 -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 A31F33F487; Tue, 20 Mar 2018 21:48:02 -0700 (PDT) From: Julien Grall <julien.grall@arm.com> To: xen-devel@lists.xen.org Date: Wed, 21 Mar 2018 04:47:30 +0000 Message-Id: <20180321044737.20794-10-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180321044737.20794-1-julien.grall@arm.com> References: <20180321044737.20794-1-julien.grall@arm.com> Subject: [Xen-devel] [for-4.11][PATCH v6 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 */