From: Jan Glauber Date: Thu, 6 Dec 2012 13:30:28 +0000 (+0100) Subject: s390/pci: speed up __iowrite64_copy by using pci store block insn X-Git-Tag: firefly_0821_release~3680^2~1464^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=87bc359b9822a73f264f24f3c1b3e4e7e5ed7d72;p=firefly-linux-kernel-4.4.55.git s390/pci: speed up __iowrite64_copy by using pci store block insn 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 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index b0cef4db2413..bc8935d3e5da 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -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) {