]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/crypto: arm: Move arch/arm/lib/crypto/ into lib/crypto/
authorEric Biggers <ebiggers@kernel.org>
Thu, 19 Jun 2025 19:19:00 +0000 (12:19 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:26:20 +0000 (09:26 -0700)
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>
18 files changed:
arch/arm/lib/.gitignore [new file with mode: 0644]
arch/arm/lib/Makefile
arch/arm/lib/crypto/.gitignore [deleted file]
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/arm/.gitignore
lib/crypto/arm/Kconfig [moved from arch/arm/lib/crypto/Kconfig with 100% similarity]
lib/crypto/arm/Makefile [moved from arch/arm/lib/crypto/Makefile with 100% similarity]
lib/crypto/arm/blake2s-core.S [moved from arch/arm/lib/crypto/blake2s-core.S with 100% similarity]
lib/crypto/arm/blake2s-glue.c [moved from arch/arm/lib/crypto/blake2s-glue.c with 100% similarity]
lib/crypto/arm/chacha-glue.c [moved from arch/arm/lib/crypto/chacha-glue.c with 100% similarity]
lib/crypto/arm/chacha-neon-core.S [moved from arch/arm/lib/crypto/chacha-neon-core.S with 100% similarity]
lib/crypto/arm/chacha-scalar-core.S [moved from arch/arm/lib/crypto/chacha-scalar-core.S with 100% similarity]
lib/crypto/arm/poly1305-armv4.pl [moved from arch/arm/lib/crypto/poly1305-armv4.pl with 100% similarity]
lib/crypto/arm/poly1305-glue.c [moved from arch/arm/lib/crypto/poly1305-glue.c with 100% similarity]
lib/crypto/arm/sha256-armv4.pl [moved from arch/arm/lib/crypto/sha256-armv4.pl with 100% similarity]
lib/crypto/arm/sha256-ce.S [moved from arch/arm/lib/crypto/sha256-ce.S with 100% similarity]
lib/crypto/arm/sha256.c [moved from arch/arm/lib/crypto/sha256.c with 100% similarity]

diff --git a/arch/arm/lib/.gitignore b/arch/arm/lib/.gitignore
new file mode 100644 (file)
index 0000000..647d7a9
--- /dev/null
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+# This now-removed directory used to contain generated files.
+/crypto/
index 91ea0e29107afc13edbc5ae5a7bdc9834c3fba42..d05dd672bcd9c241676e25aca3293cb410d48c00 100644 (file)
@@ -5,8 +5,6 @@
 # Copyright (C) 1995-2000 Russell King
 #
 
-obj-y += crypto/
-
 lib-y          := changebit.o csumipv6.o csumpartial.o               \
                   csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
                   delay.o delay-loop.o findbit.o memchr.o memcpy.o   \
diff --git a/arch/arm/lib/crypto/.gitignore b/arch/arm/lib/crypto/.gitignore
deleted file mode 100644 (file)
index 12d74d8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-poly1305-core.S
-sha256-core.S
index dce127a69f1310e25426af9e7780f8f51ed25021..e14bef8e87af249c58959035413ec301467c6750 100644 (file)
@@ -190,7 +190,7 @@ config CRYPTO_LIB_SM3
 
 if !KMSAN # avoid false positives from assembly
 if ARM
-source "arch/arm/lib/crypto/Kconfig"
+source "lib/crypto/arm/Kconfig"
 endif
 if ARM64
 source "arch/arm64/lib/crypto/Kconfig"
index aaf445a85384cef63552c9c08319478112300675..5f2b81f82a85d62cef781a06da79155d278dbe6d 100644 (file)
@@ -106,3 +106,5 @@ obj-$(CONFIG_CRYPTO_SELFTESTS_FULL)         += simd.o
 
 obj-$(CONFIG_CRYPTO_LIB_SM3)                   += libsm3.o
 libsm3-y                                       := sm3.o
+
+obj-$(CONFIG_ARM) += arm/
index 670a4d97b5684051b679cac0b1b70cc2ffc2605c..f6c4e8ef80dae9943f0e935373396c0306ea1614 100644 (file)
@@ -1,2 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
+poly1305-core.S
+sha256-core.S
 sha512-core.S