]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/timer/hpet: Mark implementation as being little-endian
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 10 Dec 2025 10:48:13 +0000 (11:48 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 30 Dec 2025 19:38:40 +0000 (20:38 +0100)
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é <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20251224134644.85582-6-philmd@linaro.org>

hw/timer/hpet.c
rust/hw/timer/hpet/src/device.rs

index 070b40e7f67e7decd848d2eb0d2157b999eef0da..0d7b8e0c7a3573e0c94e6783b27b76705023731a 100644 (file)
@@ -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)
index 3166688e4e3b0c29a3acc31e9980b163db235ef3..4757bf5fd55d5579ac53dfcc01c5c3e0bfdbc37f 100644 (file)
@@ -763,7 +763,7 @@ impl HPETState {
             MemoryRegionOpsBuilder::<HPETState>::new()
                 .read(&HPETState::read)
                 .write(&HPETState::write)
-                .native_endian()
+                .little_endian()
                 .valid_sizes(4, 8)
                 .impl_sizes(4, 8)
                 .build();