There is a singular user. It's unlikely we'll gain a big-endian build of Xen, but it's far more unlikely that bitfields will differ from main endianness.
Signed-off-by: Andrew Cooper <[email protected]> --- CC: Anthony PERARD <[email protected]> CC: Michal Orzel <[email protected]> CC: Jan Beulich <[email protected]> CC: Julien Grall <[email protected]> CC: Roger Pau Monné <[email protected]> CC: Stefano Stabellini <[email protected]> CC: Volodymyr Babchuk <[email protected]> CC: Bertrand Marquis <[email protected]> CC: Shawn Anastasio <[email protected]> CC: Oleksii Kurochko <[email protected]> CC: Daniel P. Smith <[email protected]> CC: Lin Liu <[email protected]> I'm tempted to simply drop the logic in maptrack_node. If any big-endian build of Xen came along, that's probably the least of it's worries. v5: * New. --- xen/common/grant_table.c | 4 ++-- xen/include/xen/byteorder/big_endian.h | 3 --- xen/include/xen/byteorder/little_endian.h | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 6c77867f8cdd..d6886ee74847 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -979,12 +979,12 @@ static struct active_grant_entry *grant_map_exists(const struct domain *ld, union maptrack_node { struct { /* Radix tree slot pointers use two of the bits. */ -#ifdef __BIG_ENDIAN_BITFIELD +#ifdef __BIG_ENDIAN unsigned long _0 : 2; #endif unsigned long rd : BITS_PER_LONG / 2 - 1; unsigned long wr : BITS_PER_LONG / 2 - 1; -#ifndef __BIG_ENDIAN_BITFIELD +#ifndef __BIG_ENDIAN unsigned long _0 : 2; #endif } cnt; diff --git a/xen/include/xen/byteorder/big_endian.h b/xen/include/xen/byteorder/big_endian.h index ce395a17f64b..9cfb567d51d5 100644 --- a/xen/include/xen/byteorder/big_endian.h +++ b/xen/include/xen/byteorder/big_endian.h @@ -4,9 +4,6 @@ #ifndef __BIG_ENDIAN #define __BIG_ENDIAN 4321 #endif -#ifndef __BIG_ENDIAN_BITFIELD -#define __BIG_ENDIAN_BITFIELD -#endif #include <xen/types.h> #include <xen/byteorder/swab.h> diff --git a/xen/include/xen/byteorder/little_endian.h b/xen/include/xen/byteorder/little_endian.h index 8b118afba5e3..96c80eab2b12 100644 --- a/xen/include/xen/byteorder/little_endian.h +++ b/xen/include/xen/byteorder/little_endian.h @@ -4,9 +4,6 @@ #ifndef __LITTLE_ENDIAN #define __LITTLE_ENDIAN 1234 #endif -#ifndef __LITTLE_ENDIAN_BITFIELD -#define __LITTLE_ENDIAN_BITFIELD -#endif #include <xen/types.h> #include <xen/byteorder/swab.h> -- 2.39.5
