INVALID_{G,M}FN are defined using static inline helpers _{g,m}fn.
This means, they cannot be used to initialize a build time static variable:
In file included from mm.c:24:0:
xen/xen/include/xen/mm.h:59:26: error: initializer element is not constant
#define INVALID_MFN _mfn(~0UL)
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Tim Deegan <tim@xen.org>
[jb: add parentheses and const]
Acked-by: Jan Beulich <jbeulich@suse.com>
TYPE_SAFE(unsigned long, mfn);
#define PRI_mfn "05lx"
-#define INVALID_MFN _mfn(~0UL)
+#define INVALID_MFN ((const mfn_t){ ~0UL })
#ifndef mfn_t
#define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */
TYPE_SAFE(unsigned long, gfn);
#define PRI_gfn "05lx"
-#define INVALID_GFN _gfn(~0UL)
+#define INVALID_GFN ((const gfn_t){ ~0UL })
#ifndef gfn_t
#define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */