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 <andrew.coop...@citrix.com> --- CC: Anthony PERARD <anthony.per...@vates.tech> CC: Michal Orzel <michal.or...@amd.com> CC: Jan Beulich <jbeul...@suse.com> CC: Julien Grall <jul...@xen.org> CC: Roger Pau Monné <roger....@citrix.com> CC: Stefano Stabellini <sstabell...@kernel.org> CC: Volodymyr Babchuk <volodymyr_babc...@epam.com> CC: Bertrand Marquis <bertrand.marq...@arm.com> CC: Shawn Anastasio <sanasta...@raptorengineering.com> CC: Oleksii Kurochko <oleksii.kuroc...@gmail.com> CC: Daniel P. Smith <dpsm...@apertussolutions.com> CC: Lin Liu <lin....@citrix.com> 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