Re: [PATCH v3 3/6] s390: Stop using weak symbols for __iowrite64_copy()

Arnd Bergmann
2024-04-11T20:24:01Z

On Thu, Apr 11, 2024, at 18:46, Jason Gunthorpe wrote:
> Complete switching the __iowriteXX_copy() routines over to use #define and
> arch provided inline/macro functions instead of weak symbols.
>
> S390 has an implementation that simply calls another memcpy
> function. Inline this so the callers don't have to do two jumps.
>
> Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
> arch/s390/include/asm/io.h | 7 +++++++
> arch/s390/pci/pci.c | 6 ------
> include/linux/io.h | 3 +++
> lib/iomap_copy.c | 7 +++----
> 4 files changed, 13 insertions(+), 10 deletions(-)

For the common code bits:

Acked-by: Arnd Bergmann <arnd@arndb.de>

> -void __attribute__((weak)) __iowrite64_copy(void __iomem *to,
> - const void *from,
> - size_t count)
> +#ifndef __iowrite64_copy
> +void __iowrite64_copy(void __iomem *to, const void *from, size_t count)
> {

I'm always happy to see __weak functions get cleaned up.

Arnd