s390/pci: speed up __iowrite64_copy by using pci store block insn
authorJan Glauber <jang@linux.vnet.ibm.com>
Thu, 6 Dec 2012 13:30:28 +0000 (14:30 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 11 Dec 2012 13:52:42 +0000 (14:52 +0100)
Benefit from pci store block instruction by writing up to 128 bytes
with a single instruction to MMIO space. Depending on the workload
this can result in a huge performance increase due to the reduced
number of instructions. The ordering guarantees of single stores
vs. one store block are identical.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci.c

index b0cef4db2413873fa6420df655b8df0b5a1d5a3a..bc8935d3e5da432749f099e2ffc29e67ac14ec62 100644 (file)
@@ -355,6 +355,12 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
        return 0;
 }
 
+/* combine single writes by using store-block insn */
+void __iowrite64_copy(void __iomem *to, const void *from, size_t count)
+{
+       zpci_memcpy_toio(to, from, count);
+}
+
 /* Create a virtual mapping cookie for a PCI BAR */
 void __iomem *pci_iomap(struct pci_dev *pdev, int bar, unsigned long max)
 {