linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Julian Vetter <jvetter@kalrayinc.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Guo Ren <guoren@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>,
	Andrew Morton <akpm@linux-foundation.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
	Helge Deller <deller@gmx.de>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
	loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org,
	linux-alpha@vger.kernel.org, linux-parisc@vger.kernel.org,
	linux-sh@vger.kernel.org, linux-um@lists.infradead.org,
	linux-arch@vger.kernel.org,
	Yann Sionneau <ysionneau@kalrayinc.com>
Subject: Re: [PATCH v7 00/10] Consolidate IO memcpy functions
Date: Tue, 01 Oct 2024 14:46:03 +0200	[thread overview]
Message-ID: <4c26934960a2e4240251b064287f90b378b3eee7.camel@linux.ibm.com> (raw)
In-Reply-To: <20240930132321.2785718-1-jvetter@kalrayinc.com>

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@kalrayinc.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



      parent reply	other threads:[~2024-10-01 12:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 13:23 [PATCH v7 00/10] Consolidate IO memcpy functions Julian Vetter
2024-09-30 13:23 ` [PATCH v7 01/10] Consolidate IO memcpy/memset into iomap_copy.c Julian Vetter
2024-10-03  4:23   ` kernel test robot
2024-10-03 16:46   ` Richard Henderson
2024-10-06 18:50     ` David Laight
2024-09-30 13:23 ` [PATCH v7 02/10] arm64: Use generic IO memcpy/memset Julian Vetter
2024-09-30 13:23 ` [PATCH v7 03/10] csky: " Julian Vetter
2024-09-30 13:23 ` [PATCH v7 04/10] loongarch: " Julian Vetter
2024-09-30 13:23 ` [PATCH v7 05/10] m68k: Align prototypes of " Julian Vetter
2024-09-30 17:46   ` Geert Uytterhoeven
2024-09-30 13:23 ` [PATCH v7 06/10] alpha: " Julian Vetter
2024-10-03 14:46   ` Richard Henderson
2024-09-30 13:23 ` [PATCH v7 07/10] parisc: " Julian Vetter
2024-10-03 14:49   ` Richard Henderson
2024-09-30 13:23 ` [PATCH v7 08/10] sh: " Julian Vetter
2024-09-30 17:52   ` Geert Uytterhoeven
2024-09-30 13:23 ` [PATCH v7 09/10] um: Add dummy implementation for " Julian Vetter
2024-10-01 12:53   ` Johannes Berg
2024-10-07  7:49     ` Julian Vetter
2024-10-07  8:06       ` Johannes Berg
2024-09-30 13:23 ` [PATCH v7 10/10] arm: Align prototype of IO memset Julian Vetter
2024-09-30 17:50   ` Geert Uytterhoeven
2024-10-01 12:46 ` Niklas Schnelle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c26934960a2e4240251b064287f90b378b3eee7.camel@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=dalias@libc.org \
    --cc=deller@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=guoren@kernel.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=johannes@sipsolutions.net \
    --cc=jvetter@kalrayinc.com \
    --cc=kernel@xen0n.name \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=loongarch@lists.linux.dev \
    --cc=mattst88@gmail.com \
    --cc=richard.henderson@linaro.org \
    --cc=richard@nod.at \
    --cc=will@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    --cc=ysionneau@kalrayinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).