[Xen-devel,v4,05/16] xen/mm: Introduce INVALID_GFN_T and INVALID_MFN_T

Message ID 1467046452-1261-6-git-send-email-julien.grall@arm.com
State New
Headers show

Commit Message

Julien Grall June 27, 2016, 4:54 p.m.
The two new defines will be a typesafe version of resp. INVALID_GFN and

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(+)


diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index afbb1a1..978a62e 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -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 */