diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2012-12-06 08:30:28 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-12-11 08:52:42 -0500 |
commit | 87bc359b9822a73f264f24f3c1b3e4e7e5ed7d72 (patch) | |
tree | 643e20ebffcf7eda13ad33c1bbeba82b306738c4 /arch/s390 | |
parent | 9163003236a52fd1a8ee6ca8a04f7232d001fc98 (diff) |
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 <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/pci/pci.c | 6 |
1 files changed, 6 insertions, 0 deletions
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, | |||
355 | return 0; | 355 | return 0; |
356 | } | 356 | } |
357 | 357 | ||
358 | /* combine single writes by using store-block insn */ | ||
359 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count) | ||
360 | { | ||
361 | zpci_memcpy_toio(to, from, count); | ||
362 | } | ||
363 | |||
358 | /* Create a virtual mapping cookie for a PCI BAR */ | 364 | /* Create a virtual mapping cookie for a PCI BAR */ |
359 | void __iomem *pci_iomap(struct pci_dev *pdev, int bar, unsigned long max) | 365 | void __iomem *pci_iomap(struct pci_dev *pdev, int bar, unsigned long max) |
360 | { | 366 | { |