[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] mm: introduce INVALID_{G,M}FN_RAW
commit f1e268b9fd13647e1f69c8ce0ae7be401d319fc8 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Dec 21 10:42:02 2021 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Dec 21 10:42:02 2021 +0100 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 directives). 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> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> --- xen/include/xen/mm-frame.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/include/xen/mm-frame.h b/xen/include/xen/mm-frame.h index f3b1dac3d6..0105ed0130 100644 --- 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_t y) 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_t y) 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 */ -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |