From: Philippe Mathieu-Daudé Date: Sat, 20 Dec 2025 11:40:36 +0000 (+0100) Subject: hw/virtio: Remove unused ldst_phys() helpers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dacddc530486bbdcaab1ec1dacf72b89da1a27e8;p=thirdparty%2Fqemu.git hw/virtio: Remove unused ldst_phys() helpers None of the following virtio ldst_phys() inlined helpers are used: - virtio_lduw_phys() - virtio_ldl_phys[_cached]() - virtio_ldq_phys[_cached]() - virtio_stw_phys() - virtio_stl_phys[_cached]() Just remove them. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Richard Henderson Message-Id: <20251224151351.86733-8-philmd@linaro.org> --- diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index 07aae69042..c866769cad 100644 --- a/include/hw/virtio/virtio-access.h +++ b/include/hw/virtio/virtio-access.h @@ -39,60 +39,6 @@ static inline bool virtio_access_is_big_endian(VirtIODevice *vdev) #endif } -static inline uint16_t virtio_lduw_phys(VirtIODevice *vdev, hwaddr pa) -{ - AddressSpace *dma_as = vdev->dma_as; - - if (virtio_access_is_big_endian(vdev)) { - return lduw_be_phys(dma_as, pa); - } - return lduw_le_phys(dma_as, pa); -} - -static inline uint32_t virtio_ldl_phys(VirtIODevice *vdev, hwaddr pa) -{ - AddressSpace *dma_as = vdev->dma_as; - - if (virtio_access_is_big_endian(vdev)) { - return ldl_be_phys(dma_as, pa); - } - return ldl_le_phys(dma_as, pa); -} - -static inline uint64_t virtio_ldq_phys(VirtIODevice *vdev, hwaddr pa) -{ - AddressSpace *dma_as = vdev->dma_as; - - if (virtio_access_is_big_endian(vdev)) { - return ldq_be_phys(dma_as, pa); - } - return ldq_le_phys(dma_as, pa); -} - -static inline void virtio_stw_phys(VirtIODevice *vdev, hwaddr pa, - uint16_t value) -{ - AddressSpace *dma_as = vdev->dma_as; - - if (virtio_access_is_big_endian(vdev)) { - stw_be_phys(dma_as, pa, value); - } else { - stw_le_phys(dma_as, pa, value); - } -} - -static inline void virtio_stl_phys(VirtIODevice *vdev, hwaddr pa, - uint32_t value) -{ - AddressSpace *dma_as = vdev->dma_as; - - if (virtio_access_is_big_endian(vdev)) { - stl_be_phys(dma_as, pa, value); - } else { - stl_le_phys(dma_as, pa, value); - } -} - static inline void virtio_stw_p(VirtIODevice *vdev, void *ptr, uint16_t v) { if (virtio_access_is_big_endian(vdev)) { @@ -166,26 +112,6 @@ static inline uint16_t virtio_lduw_phys_cached(VirtIODevice *vdev, return lduw_le_phys_cached(cache, pa); } -static inline uint32_t virtio_ldl_phys_cached(VirtIODevice *vdev, - MemoryRegionCache *cache, - hwaddr pa) -{ - if (virtio_access_is_big_endian(vdev)) { - return ldl_be_phys_cached(cache, pa); - } - return ldl_le_phys_cached(cache, pa); -} - -static inline uint64_t virtio_ldq_phys_cached(VirtIODevice *vdev, - MemoryRegionCache *cache, - hwaddr pa) -{ - if (virtio_access_is_big_endian(vdev)) { - return ldq_be_phys_cached(cache, pa); - } - return ldq_le_phys_cached(cache, pa); -} - static inline void virtio_stw_phys_cached(VirtIODevice *vdev, MemoryRegionCache *cache, hwaddr pa, uint16_t value) @@ -197,17 +123,6 @@ static inline void virtio_stw_phys_cached(VirtIODevice *vdev, } } -static inline void virtio_stl_phys_cached(VirtIODevice *vdev, - MemoryRegionCache *cache, - hwaddr pa, uint32_t value) -{ - if (virtio_access_is_big_endian(vdev)) { - stl_be_phys_cached(cache, pa, value); - } else { - stl_le_phys_cached(cache, pa, value); - } -} - static inline void virtio_tswap16s(VirtIODevice *vdev, uint16_t *s) { *s = virtio_tswap16(vdev, *s);