[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c26934960a2e4240251b064287f90b378b3eee7.camel@linux.ibm.com>
Date: Tue, 01 Oct 2024 14:46:03 +0200
From: Niklas Schnelle <schnelle@...ux.ibm.com>
To: Julian Vetter <jvetter@...rayinc.com>, Arnd Bergmann <arnd@...db.de>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas
<catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Guo Ren
<guoren@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui
<kernel@...0n.name>,
Andrew Morton <akpm@...ux-foundation.org>,
Geert
Uytterhoeven <geert@...ux-m68k.org>,
Richard Henderson
<richard.henderson@...aro.org>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
"James E . J . Bottomley"
<James.Bottomley@...senpartnership.com>,
Helge Deller <deller@....de>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Richard
Weinberger <richard@....at>,
Anton Ivanov
<anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-csky@...r.kernel.org, loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org, linux-alpha@...r.kernel.org,
linux-parisc@...r.kernel.org, linux-sh@...r.kernel.org,
linux-um@...ts.infradead.org, linux-arch@...r.kernel.org,
Yann Sionneau
<ysionneau@...rayinc.com>
Subject: Re: [PATCH v7 00/10] Consolidate IO memcpy functions
On Mon, 2024-09-30 at 15:23 +0200, Julian Vetter wrote:
> Thank you all for your remarks. I have addressed your feedback. I have
> also added the full history of the patchset, because it now targets
> additional architectures.
>
> Arnd: Unfortunately when adding the prototypes as 'extern ..' into
> asm-generic/io.h they conflict with some individual implementations
> (namely m68k, alpha, parisc, and sh). So, I have aligned these functions
> to match the prototypes in asm-generic/io.h.
> For the um problem, unfortunately there are A LOT of drivers that use
> these IO memcpy functions, so I went a bit the lazy route and added
> dummy functions to um's io.h.
>
> David: Thank you for your remarks. I have replaced the mix of long,
> uintptr_t, etc. all by long + sizeof(long). I have also split the
> read/write operation from the put/get_unaligned into two lines for
> better readability.
>
> Signed-off-by: Julian Vetter <jvetter@...rayinc.com>
> ---
>
Hi Julian,
It seems you missed the memcpy_toio()/memcpy_fromio() in
arch/s390/include/asm/io.h, probably because these are macros
and minimal configs might not build s390x with PCI enabled.
One snippet from the error output is:
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from ./include/linux/kvm_host.h:19:
In file included from ./include/linux/msi.h:24:
In file included from ./include/linux/irq.h:20:
In file included from ./include/linux/io.h:14:
In file included from ./arch/s390/include/asm/io.h:93:
./include/asm-generic/io.h:105:13: error: conflicting types for 'zpci_memcpy_fromio'
105 | extern void memcpy_fromio(void *to, const volatile void __iomem *from,
| ^
./arch/s390/include/asm/io.h:61:40: note: expanded from macro 'memcpy_fromio'
61 | #define memcpy_fromio(dst, src, count) zpci_memcpy_fromio(dst, src, count)
| ^
./arch/s390/include/asm/pci_io.h:144:19: note: previous definition is here
144 | static inline int zpci_memcpy_fromio(void *dst,
| ^
I think the best course of action might be to change the
zpci_memcpy_…() functions to match the generic signatures. While the
generic implementation might work it would be very inefficient for us
as we really need to use the PCI Store Block instructions.
Thanks,
Niklas
Powered by blists - more mailing lists