From: Julian Vetter <jvetter@kalrayinc.com>
To: Arnd Bergmann <arnd@arndb.de>,
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>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
loongarch@lists.linux.dev,
Yann Sionneau <ysionneau@kalrayinc.com>,
Julian Vetter <jvetter@kalrayinc.com>
Subject: [PATCH v2 0/4] Consolidate IO memcpy functions
Date: Mon, 9 Sep 2024 15:31:55 +0200 [thread overview]
Message-ID: <20240909133159.2024688-1-jvetter@kalrayinc.com> (raw)
Thank you for your feedback Arnd. In regards to the filename, etc. I
went with the first route and created a new file called io_copy.c.
Although, I'm not sure if it's a good idea to create yet another file
that serves a limited purpose. But I'm a bit afraid to add the
functions to iomap_copy.c because there is no common consus in the
architecture code about memcpy_{from,to}io. Some specify it with
_memcpy_xx, some directly with memcpy_xx, and another bunch uses
__memcpy_xx. So, if we want to merge it with iomap_copy.c, I would need
to export the __memcpy_xx symbols for all architectures that don't want
to use the "generic" memcpy_xx functions for now or rename their given
implementation to __memcpy_xx, right? But if you think it's better to
merge the two, I will have another look and modify the code for all
remaining architectures as well.
Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
---
Changes for v2:
- Renamed io.c -> io_copy.c
- Updated flag to 'GENERIC_IO_COPY'
- Replaced pointer dereferences by 'put_unaligned()'/'get_unaligned()'
- Replaced '#ifdef CONFIG_64BIT' by 'if(IS_ENABLED(CONFIG_64BIT))'
- Removed '__raw_{read,write}_native' and replaced by
'if(IS_ENABLED(CONFIG_64BIT))' -> '__raw_write{l,q}'
---
Julian Vetter (4):
Consolidate __memcpy_{to,from}io and __memset_io into a single lib
Use generic io memcpy functions on the arm64 architecture
Use generic io memcpy functions on the csky architecture
Use generic io memcpy functions on the loongarch architecture
arch/arm64/Kconfig | 1 +
arch/arm64/kernel/io.c | 87 ---------------------------
arch/csky/Kconfig | 1 +
arch/csky/kernel/Makefile | 2 +-
arch/csky/kernel/io.c | 91 ----------------------------
arch/loongarch/Kconfig | 1 +
arch/loongarch/kernel/Makefile | 2 +-
arch/loongarch/kernel/io.c | 94 -----------------------------
lib/Kconfig | 3 +
lib/Makefile | 1 +
lib/io_copy.c | 107 +++++++++++++++++++++++++++++++++
11 files changed, 116 insertions(+), 274 deletions(-)
delete mode 100644 arch/csky/kernel/io.c
delete mode 100644 arch/loongarch/kernel/io.c
create mode 100644 lib/io_copy.c
--
2.34.1
next reply other threads:[~2024-09-09 13:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 13:31 Julian Vetter [this message]
2024-09-09 13:31 ` [PATCH v2 1/4] Consolidate __memcpy_{to,from}io and __memset_io into a single lib Julian Vetter
2024-09-09 13:31 ` [PATCH v2 2/4] Use generic io memcpy functions on the arm64 architecture Julian Vetter
2024-09-09 13:31 ` [PATCH v2 3/4] Use generic io memcpy functions on the csky architecture Julian Vetter
2024-09-10 7:27 ` kernel test robot
2024-09-10 9:15 ` Arnd Bergmann
2024-09-18 2:26 ` Guo Ren
2024-09-09 13:31 ` [PATCH v2 4/4] Use generic io memcpy functions on the loongarch architecture Julian Vetter
2024-09-10 16:07 ` [PATCH v2 0/4] Consolidate IO memcpy functions Arnd Bergmann
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=20240909133159.2024688-1-jvetter@kalrayinc.com \
--to=jvetter@kalrayinc.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=guoren@kernel.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).