diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2024-04-11 18:46:14 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-04-22 22:11:19 +0200 |
commit | 20516d6e51dd9994afda8d556507cfbe7853384b (patch) | |
tree | 15e4bdf535cbe812c0c232481c3a5cefbb529c4b /lib/iomap_copy.c | |
parent | RDMA/rxe: Let destroy qp succeed with stuck packet (diff) | |
download | linux-20516d6e51dd9994afda8d556507cfbe7853384b.tar.xz linux-20516d6e51dd9994afda8d556507cfbe7853384b.zip |
x86: Stop using weak symbols for __iowrite32_copy()
Start switching iomap_copy routines over to use #define and arch provided
inline/macro functions instead of weak symbols.
Inline functions allow more compiler optimization and this is often a
driver hot path.
x86 has the only weak implementation for __iowrite32_copy(), so replace it
with a static inline containing the same single instruction inline
assembly. The compiler will generate the "mov edx,ecx" in a more optimal
way.
Remove iomap_copy_64.S
Link: https://lore.kernel.org/r/1-v3-1893cd8b9369+1925-mlx5_arm_wc_jgg@nvidia.com
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'lib/iomap_copy.c')
-rw-r--r-- | lib/iomap_copy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/iomap_copy.c b/lib/iomap_copy.c index 5de7c04e05ef..8ddcbb53507d 100644 --- a/lib/iomap_copy.c +++ b/lib/iomap_copy.c @@ -16,9 +16,8 @@ * time. Order of access is not guaranteed, nor is a memory barrier * performed afterwards. */ -void __attribute__((weak)) __iowrite32_copy(void __iomem *to, - const void *from, - size_t count) +#ifndef __iowrite32_copy +void __iowrite32_copy(void __iomem *to, const void *from, size_t count) { u32 __iomem *dst = to; const u32 *src = from; @@ -28,6 +27,7 @@ void __attribute__((weak)) __iowrite32_copy(void __iomem *to, __raw_writel(*src++, dst++); } EXPORT_SYMBOL_GPL(__iowrite32_copy); +#endif /** * __ioread32_copy - copy data from MMIO space, in 32-bit units |