From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"Jason A . Donenfeld " <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
linux-s390@vger.kernel.org, sparclinux@vger.kernel.org,
x86@kernel.org
Subject: [PATCH v2 0/9] lib/crypto: move arch/$(ARCH)/lib/crypto/ to lib/crypto/$(ARCH)/
Date: Thu, 19 Jun 2025 12:18:59 -0700 [thread overview]
Message-ID: <20250619191908.134235-1-ebiggers@kernel.org> (raw)
This series applies on top of
https://lore.kernel.org/r/20250616014019.415791-1-ebiggers@kernel.org/
and is also available in git at:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git arch-to-lib-crypto-v2
This series moves the contents of arch/$(ARCH)/lib/crypto/ into
lib/crypto/$(ARCH)/.
The new code organization makes a lot more sense for how this code
actually works and is developed. In particular, it makes it possible to
build each algorithm as a single module, with better inlining and dead
code elimination. For a more detailed explanation, see the patchset
which did this for the CRC library code:
https://lore.kernel.org/r/20250607200454.73587-1-ebiggers@kernel.org/.
Also see the patchset which did this for SHA-512:
https://lore.kernel.org/linux-crypto/20250616014019.415791-1-ebiggers@kernel.org/
This is just a preparatory series, which does the move to get the files
into their new location but keeps them building the same way as before.
Later patch series will make the actual improvements to the way the
arch-optimized code is integrated for each algorithm.
Changed in v2:
- Instead of keeping arch/*/lib/crypto/.gitignore, instead add entry
for now-removed crypto directory to arch/*/lib/.gitignore.
- Adjusted commit messages and titles.
- Added Reviewed-by.
Eric Biggers (9):
lib/crypto: arm: move arch/arm/lib/crypto/ into lib/crypto/
lib/crypto: arm64: move arch/arm64/lib/crypto/ into lib/crypto/
lib/crypto: mips: move arch/mips/lib/crypto/ into lib/crypto/
lib/crypto: powerpc: move arch/powerpc/lib/crypto/ into lib/crypto/
lib/crypto: riscv: move arch/riscv/lib/crypto/ into lib/crypto/
lib/crypto: s390: move arch/s390/lib/crypto/ into lib/crypto/
lib/crypto: sparc: move arch/sparc/lib/crypto/ into lib/crypto/
lib/crypto: x86: move arch/x86/lib/crypto/ into lib/crypto/
MAINTAINERS: drop arch/*/lib/crypto/ pattern
MAINTAINERS | 1 -
arch/arm/lib/.gitignore | 4 ++++
arch/arm/lib/Makefile | 2 --
arch/arm/lib/crypto/.gitignore | 3 ---
arch/arm64/lib/.gitignore | 4 ++++
arch/arm64/lib/Makefile | 3 ---
arch/arm64/lib/crypto/.gitignore | 3 ---
arch/mips/lib/.gitignore | 4 ++++
arch/mips/lib/Makefile | 2 --
arch/powerpc/lib/Makefile | 2 --
arch/riscv/lib/Makefile | 1 -
arch/s390/lib/Makefile | 1 -
arch/sparc/lib/Makefile | 1 -
arch/x86/lib/.gitignore | 4 ++++
arch/x86/lib/Makefile | 2 --
lib/crypto/Kconfig | 16 ++++++++--------
lib/crypto/Makefile | 11 ++++++++++-
lib/crypto/arm/.gitignore | 2 ++
{arch/arm/lib/crypto => lib/crypto/arm}/Kconfig | 0
{arch/arm/lib/crypto => lib/crypto/arm}/Makefile | 0
.../lib/crypto => lib/crypto/arm}/blake2s-core.S | 0
.../lib/crypto => lib/crypto/arm}/blake2s-glue.c | 0
.../lib/crypto => lib/crypto/arm}/chacha-glue.c | 0
.../crypto => lib/crypto/arm}/chacha-neon-core.S | 0
.../crypto/arm}/chacha-scalar-core.S | 0
.../crypto => lib/crypto/arm}/poly1305-armv4.pl | 0
.../crypto => lib/crypto/arm}/poly1305-glue.c | 0
.../crypto => lib/crypto/arm}/sha256-armv4.pl | 0
.../lib/crypto => lib/crypto/arm}/sha256-ce.S | 0
{arch/arm/lib/crypto => lib/crypto/arm}/sha256.c | 0
lib/crypto/arm64/.gitignore | 2 ++
.../lib/crypto => lib/crypto/arm64}/Kconfig | 0
.../lib/crypto => lib/crypto/arm64}/Makefile | 0
.../crypto/arm64}/chacha-neon-core.S | 0
.../crypto/arm64}/chacha-neon-glue.c | 0
.../crypto/arm64}/poly1305-armv8.pl | 0
.../crypto => lib/crypto/arm64}/poly1305-glue.c | 0
.../crypto => lib/crypto/arm64}/sha2-armv8.pl | 0
.../lib/crypto => lib/crypto/arm64}/sha256-ce.S | 0
.../lib/crypto => lib/crypto/arm64}/sha256.c | 0
.../lib/crypto => lib/crypto/mips}/.gitignore | 0
.../mips/lib/crypto => lib/crypto/mips}/Kconfig | 0
.../mips/lib/crypto => lib/crypto/mips}/Makefile | 0
.../lib/crypto => lib/crypto/mips}/chacha-core.S | 0
.../lib/crypto => lib/crypto/mips}/chacha-glue.c | 0
.../crypto => lib/crypto/mips}/poly1305-glue.c | 0
.../crypto => lib/crypto/mips}/poly1305-mips.pl | 0
.../lib/crypto => lib/crypto/powerpc}/Kconfig | 0
.../lib/crypto => lib/crypto/powerpc}/Makefile | 0
.../crypto/powerpc}/chacha-p10-glue.c | 0
.../crypto/powerpc}/chacha-p10le-8x.S | 0
.../crypto/powerpc}/poly1305-p10-glue.c | 0
.../crypto/powerpc}/poly1305-p10le_64.S | 0
.../crypto/powerpc}/sha256-spe-asm.S | 0
.../lib/crypto => lib/crypto/powerpc}/sha256.c | 0
.../lib/crypto => lib/crypto/riscv}/Kconfig | 0
.../lib/crypto => lib/crypto/riscv}/Makefile | 0
.../crypto/riscv}/chacha-riscv64-glue.c | 0
.../crypto/riscv}/chacha-riscv64-zvkb.S | 0
.../sha256-riscv64-zvknha_or_zvknhb-zvkb.S | 0
.../lib/crypto => lib/crypto/riscv}/sha256.c | 0
.../s390/lib/crypto => lib/crypto/s390}/Kconfig | 0
.../s390/lib/crypto => lib/crypto/s390}/Makefile | 0
.../lib/crypto => lib/crypto/s390}/chacha-glue.c | 0
.../lib/crypto => lib/crypto/s390}/chacha-s390.S | 0
.../lib/crypto => lib/crypto/s390}/chacha-s390.h | 0
.../s390/lib/crypto => lib/crypto/s390}/sha256.c | 0
.../lib/crypto => lib/crypto/sparc}/Kconfig | 0
.../lib/crypto => lib/crypto/sparc}/Makefile | 0
.../lib/crypto => lib/crypto/sparc}/sha256.c | 0
.../lib/crypto => lib/crypto/sparc}/sha256_asm.S | 0
.../x86/lib/crypto => lib/crypto/x86}/.gitignore | 0
{arch/x86/lib/crypto => lib/crypto/x86}/Kconfig | 0
{arch/x86/lib/crypto => lib/crypto/x86}/Makefile | 0
.../lib/crypto => lib/crypto/x86}/blake2s-core.S | 0
.../lib/crypto => lib/crypto/x86}/blake2s-glue.c | 0
.../crypto/x86}/chacha-avx2-x86_64.S | 0
.../crypto/x86}/chacha-avx512vl-x86_64.S | 0
.../crypto/x86}/chacha-ssse3-x86_64.S | 0
.../lib/crypto => lib/crypto/x86}/chacha_glue.c | 0
.../crypto/x86}/poly1305-x86_64-cryptogams.pl | 0
.../crypto => lib/crypto/x86}/poly1305_glue.c | 0
.../crypto => lib/crypto/x86}/sha256-avx-asm.S | 0
.../crypto => lib/crypto/x86}/sha256-avx2-asm.S | 0
.../crypto => lib/crypto/x86}/sha256-ni-asm.S | 0
.../crypto => lib/crypto/x86}/sha256-ssse3-asm.S | 0
{arch/x86/lib/crypto => lib/crypto/x86}/sha256.c | 0
87 files changed, 38 insertions(+), 30 deletions(-)
create mode 100644 arch/arm/lib/.gitignore
delete mode 100644 arch/arm/lib/crypto/.gitignore
create mode 100644 arch/arm64/lib/.gitignore
delete mode 100644 arch/arm64/lib/crypto/.gitignore
create mode 100644 arch/mips/lib/.gitignore
rename {arch/arm/lib/crypto => lib/crypto/arm}/Kconfig (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/Makefile (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/blake2s-core.S (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/blake2s-glue.c (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/chacha-glue.c (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/chacha-neon-core.S (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/chacha-scalar-core.S (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/poly1305-armv4.pl (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/poly1305-glue.c (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/sha256-armv4.pl (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/sha256-ce.S (100%)
rename {arch/arm/lib/crypto => lib/crypto/arm}/sha256.c (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/Kconfig (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/Makefile (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/chacha-neon-core.S (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/chacha-neon-glue.c (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/poly1305-armv8.pl (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/poly1305-glue.c (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/sha2-armv8.pl (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/sha256-ce.S (100%)
rename {arch/arm64/lib/crypto => lib/crypto/arm64}/sha256.c (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/.gitignore (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/Kconfig (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/Makefile (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/chacha-core.S (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/chacha-glue.c (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/poly1305-glue.c (100%)
rename {arch/mips/lib/crypto => lib/crypto/mips}/poly1305-mips.pl (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/Kconfig (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/Makefile (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/chacha-p10-glue.c (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/chacha-p10le-8x.S (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/poly1305-p10-glue.c (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/poly1305-p10le_64.S (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/sha256-spe-asm.S (100%)
rename {arch/powerpc/lib/crypto => lib/crypto/powerpc}/sha256.c (100%)
rename {arch/riscv/lib/crypto => lib/crypto/riscv}/Kconfig (100%)
rename {arch/riscv/lib/crypto => lib/crypto/riscv}/Makefile (100%)
rename {arch/riscv/lib/crypto => lib/crypto/riscv}/chacha-riscv64-glue.c (100%)
rename {arch/riscv/lib/crypto => lib/crypto/riscv}/chacha-riscv64-zvkb.S (100%)
rename {arch/riscv/lib/crypto => lib/crypto/riscv}/sha256-riscv64-zvknha_or_zvknhb-zvkb.S (100%)
rename {arch/riscv/lib/crypto => lib/crypto/riscv}/sha256.c (100%)
rename {arch/s390/lib/crypto => lib/crypto/s390}/Kconfig (100%)
rename {arch/s390/lib/crypto => lib/crypto/s390}/Makefile (100%)
rename {arch/s390/lib/crypto => lib/crypto/s390}/chacha-glue.c (100%)
rename {arch/s390/lib/crypto => lib/crypto/s390}/chacha-s390.S (100%)
rename {arch/s390/lib/crypto => lib/crypto/s390}/chacha-s390.h (100%)
rename {arch/s390/lib/crypto => lib/crypto/s390}/sha256.c (100%)
rename {arch/sparc/lib/crypto => lib/crypto/sparc}/Kconfig (100%)
rename {arch/sparc/lib/crypto => lib/crypto/sparc}/Makefile (100%)
rename {arch/sparc/lib/crypto => lib/crypto/sparc}/sha256.c (100%)
rename {arch/sparc/lib/crypto => lib/crypto/sparc}/sha256_asm.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/.gitignore (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/Kconfig (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/Makefile (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/blake2s-core.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/blake2s-glue.c (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/chacha-avx2-x86_64.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/chacha-avx512vl-x86_64.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/chacha-ssse3-x86_64.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/chacha_glue.c (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/poly1305-x86_64-cryptogams.pl (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/poly1305_glue.c (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/sha256-avx-asm.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/sha256-avx2-asm.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/sha256-ni-asm.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/sha256-ssse3-asm.S (100%)
rename {arch/x86/lib/crypto => lib/crypto/x86}/sha256.c (100%)
--
2.50.0
next reply other threads:[~2025-06-19 19:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 19:18 Eric Biggers [this message]
2025-06-19 19:19 ` [PATCH v2 1/9] lib/crypto: arm: move arch/arm/lib/crypto/ into lib/crypto/ Eric Biggers
2025-06-19 19:19 ` [PATCH v2 2/9] lib/crypto: arm64: move arch/arm64/lib/crypto/ " Eric Biggers
2025-06-19 19:19 ` [PATCH v2 3/9] lib/crypto: mips: move arch/mips/lib/crypto/ " Eric Biggers
2025-06-19 19:19 ` [PATCH v2 4/9] lib/crypto: powerpc: move arch/powerpc/lib/crypto/ " Eric Biggers
2025-06-19 19:19 ` [PATCH v2 5/9] lib/crypto: riscv: move arch/riscv/lib/crypto/ " Eric Biggers
2025-06-23 23:23 ` Palmer Dabbelt
2025-06-24 2:44 ` Eric Biggers
2025-06-19 19:19 ` [PATCH v2 6/9] lib/crypto: s390: move arch/s390/lib/crypto/ " Eric Biggers
2025-06-19 19:19 ` [PATCH v2 7/9] lib/crypto: sparc: move arch/sparc/lib/crypto/ " Eric Biggers
2025-06-19 19:19 ` [PATCH v2 8/9] lib/crypto: x86: move arch/x86/lib/crypto/ " Eric Biggers
2025-06-19 19:19 ` [PATCH v2 9/9] MAINTAINERS: drop arch/*/lib/crypto/ pattern Eric Biggers
2025-06-20 21:29 ` [PATCH v2 0/9] lib/crypto: move arch/$(ARCH)/lib/crypto/ to lib/crypto/$(ARCH)/ Eric Biggers
2025-06-20 21:39 ` Ard Biesheuvel
2025-06-20 22:41 ` Sohil Mehta
2025-06-21 2:53 ` Martin K. Petersen
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=20250619191908.134235-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sparclinux@vger.kernel.org \
--cc=x86@kernel.org \
/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).