Message ID | 20180314182009.14274-10-julien.grall@arm.com |
---|---|
State | Superseded |
Headers | show |
Series | xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN | expand |
On 14/03/18 18:20, julien.grall@arm.com wrote: > From: Julien Grall <julien.grall@arm.com> > > This will avoid use of pfn_to_pdx(mfn_x(mfn)) over the code base. > > Signed-off-by: Julien Grall <julien.grall@arm.com> > Reviewed-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
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 */