]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/crypto: arm64: Move arch/arm64/lib/crypto/ into lib/crypto/
authorEric Biggers <ebiggers@kernel.org>
Thu, 19 Jun 2025 19:19:01 +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/arm64/lib/crypto/ into lib/crypto/arm64/.

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/arm64/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-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
15 files changed:
arch/arm64/lib/.gitignore [new file with mode: 0644]
arch/arm64/lib/Makefile
arch/arm64/lib/crypto/.gitignore [deleted file]
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/arm64/.gitignore
lib/crypto/arm64/Kconfig [moved from arch/arm64/lib/crypto/Kconfig with 100% similarity]
lib/crypto/arm64/Makefile [moved from arch/arm64/lib/crypto/Makefile with 100% similarity]
lib/crypto/arm64/chacha-neon-core.S [moved from arch/arm64/lib/crypto/chacha-neon-core.S with 100% similarity]
lib/crypto/arm64/chacha-neon-glue.c [moved from arch/arm64/lib/crypto/chacha-neon-glue.c with 100% similarity]
lib/crypto/arm64/poly1305-armv8.pl [moved from arch/arm64/lib/crypto/poly1305-armv8.pl with 100% similarity]
lib/crypto/arm64/poly1305-glue.c [moved from arch/arm64/lib/crypto/poly1305-glue.c with 100% similarity]
lib/crypto/arm64/sha2-armv8.pl [moved from arch/arm64/lib/crypto/sha2-armv8.pl with 100% similarity]
lib/crypto/arm64/sha256-ce.S [moved from arch/arm64/lib/crypto/sha256-ce.S with 100% similarity]
lib/crypto/arm64/sha256.c [moved from arch/arm64/lib/crypto/sha256.c with 100% similarity]

diff --git a/arch/arm64/lib/.gitignore b/arch/arm64/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 027bfa9689c6a2b99e8fb5c2b6e239b808ff74f2..d97e290619bc5517403b99f3e3e2742bb771880b 100644 (file)
@@ -1,7 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-
-obj-y += crypto/
-
 lib-y          := clear_user.o delay.o copy_from_user.o                \
                   copy_to_user.o copy_page.o                           \
                   clear_page.o csum.o insn.o memchr.o memcpy.o         \
diff --git a/arch/arm64/lib/crypto/.gitignore b/arch/arm64/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 e14bef8e87af249c58959035413ec301467c6750..fdeb91bf003285f56a8c16d6c33cde2dfdf71db0 100644 (file)
@@ -193,7 +193,7 @@ if ARM
 source "lib/crypto/arm/Kconfig"
 endif
 if ARM64
-source "arch/arm64/lib/crypto/Kconfig"
+source "lib/crypto/arm64/Kconfig"
 endif
 if MIPS
 source "arch/mips/lib/crypto/Kconfig"
index 5f2b81f82a85d62cef781a06da79155d278dbe6d..19e9880c5d5f042f871c97197609c28a22edc7fe 100644 (file)
@@ -87,7 +87,7 @@ endif
 
 ifeq ($(CONFIG_ARM64),y)
 libsha512-y += arm64/sha512-core.o
-$(obj)/arm64/sha512-core.S: $(src)/../../arch/arm64/lib/crypto/sha2-armv8.pl
+$(obj)/arm64/sha512-core.S: $(src)/arm64/sha2-armv8.pl
        $(call cmd,perlasm_with_args)
 clean-files += arm64/sha512-core.S
 libsha512-$(CONFIG_KERNEL_MODE_NEON) += arm64/sha512-ce-core.o
@@ -108,3 +108,4 @@ obj-$(CONFIG_CRYPTO_LIB_SM3)                        += libsm3.o
 libsm3-y                                       := sm3.o
 
 obj-$(CONFIG_ARM) += arm/
+obj-$(CONFIG_ARM64) += arm64/
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