From d360eddc604479d85bb8dfaed2813fcd44c5acc4 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Fri, 6 Oct 2017 08:54:15 +0200 Subject: [PATCH] rte_virtio: remove PowerPC-specific code We don't support PPC. Since the code around is changing let's remove it. To keep the codebase small. It's so huge already. Change-Id: I86b15ae9f6de7b9e612542c8e846aa11047e282a Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/381624 Tested-by: SPDK Automated Test System Reviewed-by: Pawel Wodkowski Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- lib/bdev/virtio/rte_virtio/virtio_pci.c | 54 ------------------------- 1 file changed, 54 deletions(-) diff --git a/lib/bdev/virtio/rte_virtio/virtio_pci.c b/lib/bdev/virtio/rte_virtio/virtio_pci.c index a3b1a21b1..52d53d065 100644 --- a/lib/bdev/virtio/rte_virtio/virtio_pci.c +++ b/lib/bdev/virtio/rte_virtio/virtio_pci.c @@ -122,34 +122,9 @@ legacy_read_dev_config(struct virtio_dev *dev, size_t offset, void *dst, int length) { struct virtio_hw *hw = virtio_dev_get_hw(dev); -#ifdef RTE_ARCH_PPC_64 - int size; - while (length > 0) { - if (length >= 4) { - size = 4; - rte_pci_ioport_read(vtpci_io(dev), dst, size, - VIRTIO_PCI_CONFIG(dev) + offset); - *(uint32_t *)dst = rte_be_to_cpu_32(*(uint32_t *)dst); - } else if (length >= 2) { - size = 2; - rte_pci_ioport_read(vtpci_io(dev), dst, size, - VIRTIO_PCI_CONFIG(dev) + offset); - *(uint16_t *)dst = rte_be_to_cpu_16(*(uint16_t *)dst); - } else { - size = 1; - rte_pci_ioport_read(vtpci_io(dev), dst, size, - VIRTIO_PCI_CONFIG(dev) + offset); - } - - dst = (char *)dst + size; - offset += size; - length -= size; - } -#else rte_pci_ioport_read(vtpci_io(dev), dst, length, VIRTIO_PCI_CONFIG(hw) + offset); -#endif } static void @@ -157,38 +132,9 @@ legacy_write_dev_config(struct virtio_dev *dev, size_t offset, const void *src, int length) { struct virtio_hw *hw = virtio_dev_get_hw(dev); -#ifdef RTE_ARCH_PPC_64 - union { - uint32_t u32; - uint16_t u16; - } tmp; - int size; - while (length > 0) { - if (length >= 4) { - size = 4; - tmp.u32 = rte_cpu_to_be_32(*(const uint32_t *)src); - rte_pci_ioport_write(vtpci_io(hw), &tmp.u32, size, - VIRTIO_PCI_CONFIG(hw) + offset); - } else if (length >= 2) { - size = 2; - tmp.u16 = rte_cpu_to_be_16(*(const uint16_t *)src); - rte_pci_ioport_write(vtpci_io(hw), &tmp.u16, size, - VIRTIO_PCI_CONFIG(hw) + offset); - } else { - size = 1; - rte_pci_ioport_write(vtpci_io(hw), src, size, - VIRTIO_PCI_CONFIG(hw) + offset); - } - - src = (const char *)src + size; - offset += size; - length -= size; - } -#else rte_pci_ioport_write(vtpci_io(dev), src, length, VIRTIO_PCI_CONFIG(hw) + offset); -#endif } static uint64_t