Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib/crypto: arm: Move arch/arm/lib/crypto/ into lib/crypto/

Move the contents of arch/arm/lib/crypto/ into lib/crypto/arm/.

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 commit, which does the move to get the files
into their new location but keeps them building the same way as before.
Later commits will make the actual improvements to the way the
arch-optimized code is integrated for each algorithm.

Add a gitignore entry for the removed directory arch/arm/lib/crypto/ so
that people don't accidentally commit leftover generated files.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/r/20250619191908.134235-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

+9 -6
+4
arch/arm/lib/.gitignore
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + 3 + # This now-removed directory used to contain generated files. 4 + /crypto/
-2
arch/arm/lib/Makefile
··· 5 5 # Copyright (C) 1995-2000 Russell King 6 6 # 7 7 8 - obj-y += crypto/ 9 - 10 8 lib-y := changebit.o csumipv6.o csumpartial.o \ 11 9 csumpartialcopy.o csumpartialcopyuser.o clearbit.o \ 12 10 delay.o delay-loop.o findbit.o memchr.o memcpy.o \
-3
arch/arm/lib/crypto/.gitignore
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - poly1305-core.S 3 - sha256-core.S
arch/arm/lib/crypto/Kconfig lib/crypto/arm/Kconfig
arch/arm/lib/crypto/Makefile lib/crypto/arm/Makefile
arch/arm/lib/crypto/blake2s-core.S lib/crypto/arm/blake2s-core.S
arch/arm/lib/crypto/blake2s-glue.c lib/crypto/arm/blake2s-glue.c
arch/arm/lib/crypto/chacha-glue.c lib/crypto/arm/chacha-glue.c
arch/arm/lib/crypto/chacha-neon-core.S lib/crypto/arm/chacha-neon-core.S
arch/arm/lib/crypto/chacha-scalar-core.S lib/crypto/arm/chacha-scalar-core.S
arch/arm/lib/crypto/poly1305-armv4.pl lib/crypto/arm/poly1305-armv4.pl
arch/arm/lib/crypto/poly1305-glue.c lib/crypto/arm/poly1305-glue.c
arch/arm/lib/crypto/sha256-armv4.pl lib/crypto/arm/sha256-armv4.pl
arch/arm/lib/crypto/sha256-ce.S lib/crypto/arm/sha256-ce.S
arch/arm/lib/crypto/sha256.c lib/crypto/arm/sha256.c
+1 -1
lib/crypto/Kconfig
··· 190 190 191 191 if !KMSAN # avoid false positives from assembly 192 192 if ARM 193 - source "arch/arm/lib/crypto/Kconfig" 193 + source "lib/crypto/arm/Kconfig" 194 194 endif 195 195 if ARM64 196 196 source "arch/arm64/lib/crypto/Kconfig"
+2
lib/crypto/Makefile
··· 106 106 107 107 obj-$(CONFIG_CRYPTO_LIB_SM3) += libsm3.o 108 108 libsm3-y := sm3.o 109 + 110 + obj-$(CONFIG_ARM) += arm/
+2
lib/crypto/arm/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 + poly1305-core.S 3 + sha256-core.S 2 4 sha512-core.S