WORDS_BIGENDIAN is a QEMU-ism. In the very dim and distant past, we had a
fork of QEMU living in xen.git which wired WORDS_BIGENDIAN in the userspace
part of the build, but nothing ever wired it up in the hypervisor build.
Fixes: 86d5da49a6f7 ("[HVM] Support multiple HVM time device models coming
soon.")
Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Oleksii Kurochko <[email protected]>
I'm not sure that this wants backporting, seeing as we have no big-endian
architectures at all. Otherwse, 4.20 and older can't rely on the existence of
__LITTLE_ENDIAN on older toolchains.
---
xen/lib/muldiv64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xen/lib/muldiv64.c b/xen/lib/muldiv64.c
index 79411f5d59ea..f281578c09a4 100644
--- a/xen/lib/muldiv64.c
+++ b/xen/lib/muldiv64.c
@@ -13,10 +13,12 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
union {
uint64_t ll;
struct {
-#ifdef WORDS_BIGENDIAN
+#if defined(__BIG_ENDIAN)
uint32_t high, low;
-#else
+#elif defined(__LITTLE_ENDIAN)
uint32_t low, high;
+#else
+# error Unknown Endianness
#endif
} l;
} u, res;
--
2.39.5