diff options
| author | Jason Gunthorpe <[email protected]> | 2024-04-11 13:46:14 -0300 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2024-04-22 17:11:19 -0300 |
| commit | 20516d6e51dd9994afda8d556507cfbe7853384b (patch) | |
| tree | 15e4bdf535cbe812c0c232481c3a5cefbb529c4b /include/linux | |
| parent | 1a633bdc8fd9e9e4a9f9a668ae122edfc5aacc86 (diff) | |
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/[email protected]
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/io.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/io.h b/include/linux/io.h index 235ba7d80a8f..ce86120ce9d5 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -16,7 +16,10 @@ struct device; struct resource; -__visible void __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); +#endif + void __ioread32_copy(void *to, const void __iomem *from, size_t count); void __iowrite64_copy(void __iomem *to, const void *from, size_t count); |