]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/sparc: Mark devices as big-endian
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 6 Nov 2024 17:43:47 +0000 (17:43 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 31 Dec 2024 20:21:34 +0000 (21:21 +0100)
These devices are only used by the SPARC targets, which are
only built as big-endian. Therefore the DEVICE_NATIVE_ENDIAN
definition expand to DEVICE_BIG_ENDIAN (besides, the
DEVICE_LITTLE_ENDIAN case isn't tested). Simplify directly
using DEVICE_BIG_ENDIAN.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241106184612.71897-6-philmd@linaro.org>

hw/sparc/sun4m_iommu.c
hw/sparc64/sun4u.c

index 8c1fc82534f6984d86dbefd6653e754f9b737e23..5a4c1f5e3bd6e068006fd9b7a676eeeae590e792 100644 (file)
@@ -238,7 +238,7 @@ static void iommu_mem_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps iommu_mem_ops = {
     .read = iommu_mem_read,
     .write = iommu_mem_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_BIG_ENDIAN,
     .valid = {
         .min_access_size = 4,
         .max_access_size = 4,
index 5778709b41259c2acf8e297c7dcc7a23a4ef69e1..0980b446593b1d110188f6321523f75e3929147c 100644 (file)
@@ -254,7 +254,7 @@ static void power_mem_write(void *opaque, hwaddr addr,
 static const MemoryRegionOps power_mem_ops = {
     .read = power_mem_read,
     .write = power_mem_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_BIG_ENDIAN,
     .valid = {
         .min_access_size = 4,
         .max_access_size = 4,