From: Philippe Mathieu-Daudé Date: Wed, 10 Dec 2025 10:48:13 +0000 (+0100) Subject: hw/timer/hpet: Mark implementation as being little-endian X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56f7e42c474fa9f9f409f37c0882be4149d8c427;p=thirdparty%2Fqemu.git hw/timer/hpet: Mark implementation as being little-endian The HPET component is only built / used by X86 targets, which are only built in little endianness. Thus we only ever built as little endian, never testing the big-endian possibility of the DEVICE_NATIVE_ENDIAN definition. Simplify by only keeping the little endian variant. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Message-Id: <20251224134644.85582-6-philmd@linaro.org> --- diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 070b40e7f6..0d7b8e0c7a 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -648,7 +648,7 @@ static const MemoryRegionOps hpet_ram_ops = { .min_access_size = 4, .max_access_size = 8, }, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void hpet_reset(DeviceState *d) diff --git a/rust/hw/timer/hpet/src/device.rs b/rust/hw/timer/hpet/src/device.rs index 3166688e4e..4757bf5fd5 100644 --- a/rust/hw/timer/hpet/src/device.rs +++ b/rust/hw/timer/hpet/src/device.rs @@ -763,7 +763,7 @@ impl HPETState { MemoryRegionOpsBuilder::::new() .read(&HPETState::read) .write(&HPETState::write) - .native_endian() + .little_endian() .valid_sizes(4, 8) .impl_sizes(4, 8) .build();