[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/29] hw/i386: Mark devices as little-endian
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 07/29] hw/i386: Mark devices as little-endian |
Date: |
Tue, 31 Dec 2024 21:22:06 +0100 |
These devices are only used by the X86 targets, which are only
built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN
definition expand to DEVICE_LITTLE_ENDIAN (besides, the
DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using
DEVICE_LITTLE_ENDIAN.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Message-Id: <20241106184612.71897-2-philmd@linaro.org>
---
hw/i386/kvm/apic.c | 2 +-
hw/i386/pc.c | 4 ++--
hw/i386/vapic.c | 2 +-
hw/i386/xen/xen_apic.c | 2 +-
hw/i386/xen/xen_platform.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c
index 602c7696565..75751060009 100644
--- a/hw/i386/kvm/apic.c
+++ b/hw/i386/kvm/apic.c
@@ -214,7 +214,7 @@ static void kvm_apic_mem_write(void *opaque, hwaddr addr,
static const MemoryRegionOps kvm_apic_io_ops = {
.read = kvm_apic_mem_read,
.write = kvm_apic_mem_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static void kvm_apic_reset(APICCommonState *s)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 53a2f226d03..71118765884 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1068,7 +1068,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
static const MemoryRegionOps ioport80_io_ops = {
.write = ioport80_write,
.read = ioport80_read,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
.impl = {
.min_access_size = 1,
.max_access_size = 1,
@@ -1078,7 +1078,7 @@ static const MemoryRegionOps ioport80_io_ops = {
static const MemoryRegionOps ioportF0_io_ops = {
.write = ioportF0_write,
.read = ioportF0_read,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
.impl = {
.min_access_size = 1,
.max_access_size = 1,
diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c
index 0e6d058d063..14de9b7a820 100644
--- a/hw/i386/vapic.c
+++ b/hw/i386/vapic.c
@@ -718,7 +718,7 @@ static uint64_t vapic_read(void *opaque, hwaddr addr,
unsigned size)
static const MemoryRegionOps vapic_ops = {
.write = vapic_write,
.read = vapic_read,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static void vapic_realize(DeviceState *dev, Error **errp)
diff --git a/hw/i386/xen/xen_apic.c b/hw/i386/xen/xen_apic.c
index 101e16a7662..a94e9005cbe 100644
--- a/hw/i386/xen/xen_apic.c
+++ b/hw/i386/xen/xen_apic.c
@@ -36,7 +36,7 @@ static void xen_apic_mem_write(void *opaque, hwaddr addr,
static const MemoryRegionOps xen_apic_io_ops = {
.read = xen_apic_mem_read,
.write = xen_apic_mem_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static void xen_apic_realize(DeviceState *dev, Error **errp)
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 0f68c3fe7b3..dd648a2ee94 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -514,7 +514,7 @@ static void platform_mmio_write(void *opaque, hwaddr addr,
static const MemoryRegionOps platform_mmio_handler = {
.read = &platform_mmio_read,
.write = &platform_mmio_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static void platform_mmio_setup(PCIXenPlatformState *d)
--
2.47.1
- [PULL 00/29] Misc HW patches for 2024-12-31, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 01/29] hw/pci-host/gpex: Allow more than 4 legacy IRQs, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 02/29] hw/misc/ivshmem-flat: Add ivshmem-flat device, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 03/29] hw/misc/ivshmem: Rename ivshmem to ivshmem-pci, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 04/29] hw/usb/uhci: checkpatch cleanup, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 05/29] hw/usb/uhci: Introduce and use register defines, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 06/29] hw/microblaze: Propagate CPU endianness to microblaze_load_kernel(), Philippe Mathieu-Daudé, 2024/12/31
- [PULL 07/29] hw/i386: Mark devices as little-endian,
Philippe Mathieu-Daudé <=
- [PULL 08/29] hw/tricore: Mark devices as little-endian, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 09/29] hw/openrisc: Mark devices as big-endian, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 10/29] hw/sparc: Mark devices as big-endian, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 11/29] hw/net/xilinx_ethlite: Convert some debug logs to trace events, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 12/29] hw/net/xilinx_ethlite: Remove unuseful debug logs, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 13/29] hw/net/xilinx_ethlite: Update QOM style, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 14/29] hw/net/xilinx_ethlite: Correct maximum RX buffer size, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 15/29] hw/net/xilinx_ethlite: Rename rxbuf -> port_index, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 16/29] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read(), Philippe Mathieu-Daudé, 2024/12/31
- [PULL 17/29] hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro, Philippe Mathieu-Daudé, 2024/12/31