@@ -56,6 +56,7 @@
TYPE_SAFE(unsigned long, mfn);
#define PRI_mfn "05lx"
#define INVALID_MFN (~0UL)
+#define INVALID_MFN_T _mfn(INVALID_MFN)
#ifndef mfn_t
#define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */
@@ -85,6 +86,7 @@ static inline bool_t mfn_eq(mfn_t x, mfn_t y)
TYPE_SAFE(unsigned long, gfn);
#define PRI_gfn "05lx"
#define INVALID_GFN (~0UL)
+#define INVALID_GFN_T _gfn(INVALID_GFN)
#ifndef gfn_t
#define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */
The two new defines will be a typesafe version of resp. INVALID_GFN and INVALID_MFN. Signed-off-by: Julien Grall <julien.grall@arm.com> --- Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: George Dunlap <George.Dunlap@eu.citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Tim Deegan <tim@xen.org> Cc: Wei Liu <wei.liu2@citrix.com> Changes in v4: - Patch added --- xen/include/xen/mm.h | 2 ++ 1 file changed, 2 insertions(+)