From: Jason Gunthorpe Date: Sat, 17 Feb 2024 00:48:14 +0000 (-0400) Subject: s390: use the correct count for __iowrite64_copy() X-Git-Tag: v6.6.19~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef6566d10cf760190c705ea5c45c5a98c449fb85;p=platform%2Fkernel%2Flinux-thead.git s390: use the correct count for __iowrite64_copy() [ Upstream commit 723a2cc8d69d4342b47dfddbfe6c19f1b135f09b ] The signature for __iowrite64_copy() requires the number of 64 bit quantities, not bytes. Multiple by 8 to get to a byte length before invoking zpci_memcpy_toio() Fixes: 87bc359b9822 ("s390/pci: speed up __iowrite64_copy by using pci store block insn") Acked-by: Niklas Schnelle Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-9223d11a7662+1d7785-s390_iowrite64_jgg@nvidia.com Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index d34d5813d006..777362cb4ea8 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -241,7 +241,7 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, /* 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); + zpci_memcpy_toio(to, from, count * 8); } void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,