|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 1/2] mm: introduce INVALID_{G,M}FN_RAW
This allows properly tying together INVALID_{G,M}FN and
INVALID_{G,M}FN_INITIALIZER as well as using the actual values in
compile time constant expressions (or even preprocessor dirctives).
Since INVALID_PFN is unused, and with x86'es paging_mark_pfn_dirty()
being the only user of pfn_t it also doesn't seem likely that new uses
would appear, remove that one at this same occasion.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.
--- a/xen/include/xen/mm-frame.h
+++ b/xen/include/xen/mm-frame.h
@@ -6,12 +6,13 @@
TYPE_SAFE(unsigned long, mfn);
#define PRI_mfn "05lx"
-#define INVALID_MFN _mfn(~0UL)
+#define INVALID_MFN_RAW (~0UL)
+#define INVALID_MFN _mfn(INVALID_MFN_RAW)
/*
* To be used for global variable initialization. This workaround a bug
* in GCC < 5.0.
*/
-#define INVALID_MFN_INITIALIZER { ~0UL }
+#define INVALID_MFN_INITIALIZER { INVALID_MFN_RAW }
#ifndef mfn_t
#define mfn_t /* Grep fodder: mfn_t, _mfn() and mfn_x() are defined above */
@@ -44,12 +45,13 @@ static inline bool_t mfn_eq(mfn_t x, mfn
TYPE_SAFE(unsigned long, gfn);
#define PRI_gfn "05lx"
-#define INVALID_GFN _gfn(~0UL)
+#define INVALID_GFN_RAW (~0UL)
+#define INVALID_GFN _gfn(INVALID_GFN_RAW)
/*
* To be used for global variable initialization. This workaround a bug
* in GCC < 5.0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64856
*/
-#define INVALID_GFN_INITIALIZER { ~0UL }
+#define INVALID_GFN_INITIALIZER { INVALID_GFN_RAW }
#ifndef gfn_t
#define gfn_t /* Grep fodder: gfn_t, _gfn() and gfn_x() are defined above */
@@ -82,7 +84,6 @@ static inline bool_t gfn_eq(gfn_t x, gfn
TYPE_SAFE(unsigned long, pfn);
#define PRI_pfn "05lx"
-#define INVALID_PFN (~0UL)
#ifndef pfn_t
#define pfn_t /* Grep fodder: pfn_t, _pfn() and pfn_x() are defined above */
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |