diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2024-04-11 13:46:15 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-04-22 17:11:19 -0300 |
commit | 6ae798cbef4ba1f180aa1a590e33a2d89f7cc34f (patch) | |
tree | c15897610b53f8cf5583dfc9da587305432576c6 | |
parent | 20516d6e51dd9994afda8d556507cfbe7853384b (diff) | |
download | lwn-6ae798cbef4ba1f180aa1a590e33a2d89f7cc34f.tar.gz lwn-6ae798cbef4ba1f180aa1a590e33a2d89f7cc34f.zip |
s390: Implement __iowrite32_copy()
It is trivial to implement an inline to do this, so provide it in the s390
headers. Like the 64 bit version it should just invoke zpci_memcpy_toio()
with the correct size.
Link: https://lore.kernel.org/r/2-v3-1893cd8b9369+1925-mlx5_arm_wc_jgg@nvidia.com
Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r-- | arch/s390/include/asm/io.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index 4453ad7c11ac..00704fc8a54b 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h @@ -73,6 +73,14 @@ static inline void ioport_unmap(void __iomem *p) #define __raw_writel zpci_write_u32 #define __raw_writeq zpci_write_u64 +/* combine single writes by using store-block insn */ +static inline void __iowrite32_copy(void __iomem *to, const void *from, + size_t count) +{ + zpci_memcpy_toio(to, from, count * 4); +} +#define __iowrite32_copy __iowrite32_copy + #endif /* CONFIG_PCI */ #include <asm-generic/io.h> |