From: "Arnd Bergmann" <arnd@arndb.de>
To: "Julian Vetter" <jvetter@kalrayinc.com>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>, guoren <guoren@kernel.org>,
"Huacai Chen" <chenhuacai@kernel.org>,
"WANG Xuerui" <kernel@xen0n.name>,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
"linux-csky@vger.kernel.org" <linux-csky@vger.kernel.org>,
loongarch@lists.linux.dev,
"Yann Sionneau" <ysionneau@kalrayinc.com>
Subject: Re: [PATCH v6 1/5] Consolidate __memcpy_{to,from}io and __memset_io into iomap_copy.c
Date: Thu, 26 Sep 2024 07:14:16 +0000 [thread overview]
Message-ID: <f47e66f9-ec20-4e75-b88f-d412339e797d@app.fastmail.com> (raw)
In-Reply-To: <20240925132420.821473-2-jvetter@kalrayinc.com>
On Wed, Sep 25, 2024, at 13:24, Julian Vetter wrote:
> Various architectures have almost the same implementations for
> __memcpy_{to,from}io and __memset_io functions. So, consolidate them
> into the existing lib/iomap_copy.c.
>
> Reviewed-by: Yann Sionneau <ysionneau@kalrayinc.com>
> Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
> ---
> Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
You have a duplicated signoff here.
> +#ifndef __memcpy_fromio
> +void __memcpy_fromio(void *to, const volatile void __iomem *from,
> size_t count);
> +#endif
> +
> +#ifndef __memcpy_toio
> +void __memcpy_toio(volatile void __iomem *to, const void *from, size_t
> count);
> +#endif
> +
> +#ifndef __memset_io
> +void __memset_io(volatile void __iomem *dst, int c, size_t count);
> +#endif
I'm not entirely sure about the purpose of the #ifdef here, since
nothing ever overrides the double-underscore versions, both before
and after your patches.
Unless I'm missing something here, I think a more logical
sequence would be:
1. add the definitions in this file without the underscores,
as memcpy_fromio/memcpy_toio/memset_io, with the #ifdef
for that name that is always set at this point
2. replace the default implementation in asm-generic/io.h
with extern prototypes, remove the #define from those
3. convert the other architectures, removing both the
implementations and the prototypes.
Arnd
next prev parent reply other threads:[~2024-09-26 7:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 13:24 [PATCH v6 0/5] Consolidate IO memcpy functions Julian Vetter
2024-09-25 13:24 ` [PATCH v6 1/5] Consolidate __memcpy_{to,from}io and __memset_io into iomap_copy.c Julian Vetter
2024-09-26 7:14 ` Arnd Bergmann [this message]
2024-09-27 8:19 ` Julian Vetter
2024-09-27 10:59 ` Arnd Bergmann
2024-09-29 20:37 ` David Laight
2024-09-25 13:24 ` [PATCH v6 2/5] Replace generic memcpy and memset by IO memcpy functions Julian Vetter
2024-09-27 5:28 ` kernel test robot
2024-09-27 5:49 ` kernel test robot
2024-09-25 13:24 ` [PATCH v6 3/5] arm64: Use generic io " Julian Vetter
2024-09-25 13:24 ` [PATCH v6 4/5] csky: " Julian Vetter
2024-09-26 3:22 ` Guo Ren
2024-09-25 13:24 ` [PATCH v6 5/5] loongarch: " Julian Vetter
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=f47e66f9-ec20-4e75-b88f-d412339e797d@app.fastmail.com \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=guoren@kernel.org \
--cc=jvetter@kalrayinc.com \
--cc=kernel@xen0n.name \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=will@kernel.org \
--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