]> xenbits.xensource.com Git - xen.git/commitdiff
Revert "mm: don't use _{g,m}fn for defining INVALID_{G,M}FN"
authorJulien Grall <julien.grall@arm.com>
Tue, 27 Jun 2017 09:33:19 +0000 (10:33 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 30 Jun 2017 10:27:50 +0000 (11:27 +0100)
This reverts commit 725039d39ef10c6e3c59ba4a2511188281133b19. The change
was intended to solve compilation when using INVALID_{G,M}FN for global
variables.

However, due to a compiler bug this will not work for GCC up to 5.0 (see
[1]).

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64856

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/include/xen/mm.h

index 1025a56231eb3da97c19b6c6101387d4ec0899b7..0050fba498f4ac56e058a6a24f90733dab46dc99 100644 (file)
@@ -56,7 +56,7 @@
 
 TYPE_SAFE(unsigned long, mfn);
 #define PRI_mfn          "05lx"
-#define INVALID_MFN      ((const mfn_t){ ~0UL })
+#define INVALID_MFN      _mfn(~0UL)
 
 #ifndef mfn_t
 #define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */
@@ -89,7 +89,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      ((const gfn_t){ ~0UL })
+#define INVALID_GFN      _gfn(~0UL)
 
 #ifndef gfn_t
 #define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */