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

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/x86/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-9-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
20 files changed:
arch/x86/lib/.gitignore
arch/x86/lib/Makefile
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/x86/.gitignore [moved from arch/x86/lib/crypto/.gitignore with 100% similarity]
lib/crypto/x86/Kconfig [moved from arch/x86/lib/crypto/Kconfig with 100% similarity]
lib/crypto/x86/Makefile [moved from arch/x86/lib/crypto/Makefile with 100% similarity]
lib/crypto/x86/blake2s-core.S [moved from arch/x86/lib/crypto/blake2s-core.S with 100% similarity]
lib/crypto/x86/blake2s-glue.c [moved from arch/x86/lib/crypto/blake2s-glue.c with 100% similarity]
lib/crypto/x86/chacha-avx2-x86_64.S [moved from arch/x86/lib/crypto/chacha-avx2-x86_64.S with 100% similarity]
lib/crypto/x86/chacha-avx512vl-x86_64.S [moved from arch/x86/lib/crypto/chacha-avx512vl-x86_64.S with 100% similarity]
lib/crypto/x86/chacha-ssse3-x86_64.S [moved from arch/x86/lib/crypto/chacha-ssse3-x86_64.S with 100% similarity]
lib/crypto/x86/chacha_glue.c [moved from arch/x86/lib/crypto/chacha_glue.c with 100% similarity]
lib/crypto/x86/poly1305-x86_64-cryptogams.pl [moved from arch/x86/lib/crypto/poly1305-x86_64-cryptogams.pl with 100% similarity]
lib/crypto/x86/poly1305_glue.c [moved from arch/x86/lib/crypto/poly1305_glue.c with 100% similarity]
lib/crypto/x86/sha256-avx-asm.S [moved from arch/x86/lib/crypto/sha256-avx-asm.S with 100% similarity]
lib/crypto/x86/sha256-avx2-asm.S [moved from arch/x86/lib/crypto/sha256-avx2-asm.S with 100% similarity]
lib/crypto/x86/sha256-ni-asm.S [moved from arch/x86/lib/crypto/sha256-ni-asm.S with 100% similarity]
lib/crypto/x86/sha256-ssse3-asm.S [moved from arch/x86/lib/crypto/sha256-ssse3-asm.S with 100% similarity]
lib/crypto/x86/sha256.c [moved from arch/x86/lib/crypto/sha256.c with 100% similarity]

index 8ae0f93ecbfddaa60a5c69b0c4e7bfdec45c4edd..ec2131c9fd206939ba33f7e2b06be79d1045bf00 100644 (file)
@@ -1,2 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# This now-removed directory used to contain generated files.
+/crypto/
+
 inat-tables.c
index 4fa5c4e1ba8a005132815bc7f2745d19971bdbf4..7cf8681cba0f2d15dce0709cb1c41724703feb61 100644 (file)
@@ -3,8 +3,6 @@
 # Makefile for x86 specific library files.
 #
 
-obj-y += crypto/
-
 # Produces uninteresting flaky coverage.
 KCOV_INSTRUMENT_delay.o        := n
 
index b98543c7ef231ebded377ad0cc7bd5b8b9ad443d..2460ddff967fce21663baa4dc2ab11e99af40464 100644 (file)
@@ -211,7 +211,7 @@ if SPARC
 source "lib/crypto/sparc/Kconfig"
 endif
 if X86
-source "arch/x86/lib/crypto/Kconfig"
+source "lib/crypto/x86/Kconfig"
 endif
 endif
 
index 7c1e7d06cac9dcd70cf4c9138cd02b044566be4a..5823137fa5a8cb09a4a62bf395fd133581752529 100644 (file)
@@ -114,3 +114,4 @@ obj-$(CONFIG_PPC) += powerpc/
 obj-$(CONFIG_RISCV) += riscv/
 obj-$(CONFIG_S390) += s390/
 obj-$(CONFIG_SPARC) += sparc/
+obj-$(CONFIG_X86) += x86/