summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-06-19 12:19:03 -0700
committerEric Biggers <ebiggers@kernel.org>2025-06-30 09:26:20 -0700
commit676d45aba8c498dc14ffd27338dba8d4395787e2 (patch)
tree1a455b959135f7f46e1b6e666ac4a596d286fed6
parent7e54e993ab8c98d912f54ad6f46bfcc9dcd65368 (diff)
lib/crypto: powerpc: Move arch/powerpc/lib/crypto/ into lib/crypto/
Move the contents of arch/powerpc/lib/crypto/ into lib/crypto/powerpc/. 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. 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-5-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
-rw-r--r--arch/powerpc/lib/Makefile2
-rw-r--r--lib/crypto/Kconfig2
-rw-r--r--lib/crypto/Makefile1
-rw-r--r--lib/crypto/powerpc/Kconfig (renamed from arch/powerpc/lib/crypto/Kconfig)0
-rw-r--r--lib/crypto/powerpc/Makefile (renamed from arch/powerpc/lib/crypto/Makefile)0
-rw-r--r--lib/crypto/powerpc/chacha-p10-glue.c (renamed from arch/powerpc/lib/crypto/chacha-p10-glue.c)0
-rw-r--r--lib/crypto/powerpc/chacha-p10le-8x.S (renamed from arch/powerpc/lib/crypto/chacha-p10le-8x.S)0
-rw-r--r--lib/crypto/powerpc/poly1305-p10-glue.c (renamed from arch/powerpc/lib/crypto/poly1305-p10-glue.c)0
-rw-r--r--lib/crypto/powerpc/poly1305-p10le_64.S (renamed from arch/powerpc/lib/crypto/poly1305-p10le_64.S)0
-rw-r--r--lib/crypto/powerpc/sha256-spe-asm.S (renamed from arch/powerpc/lib/crypto/sha256-spe-asm.S)0
-rw-r--r--lib/crypto/powerpc/sha256.c (renamed from arch/powerpc/lib/crypto/sha256.c)0
11 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 481f968e42c7..27f8a0143860 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -3,8 +3,6 @@
# Makefile for ppc-specific library files..
#
-obj-y += crypto/
-
CFLAGS_code-patching.o += -fno-stack-protector
CFLAGS_feature-fixups.o += -fno-stack-protector
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index 43c44316fbbd..f4f9a70dd089 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -199,7 +199,7 @@ if MIPS
source "lib/crypto/mips/Kconfig"
endif
if PPC
-source "arch/powerpc/lib/crypto/Kconfig"
+source "lib/crypto/powerpc/Kconfig"
endif
if RISCV
source "arch/riscv/lib/crypto/Kconfig"
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index f54d2f3edc40..f5f1dcec2f89 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -110,3 +110,4 @@ libsm3-y := sm3.o
obj-$(CONFIG_ARM) += arm/
obj-$(CONFIG_ARM64) += arm64/
obj-$(CONFIG_MIPS) += mips/
+obj-$(CONFIG_PPC) += powerpc/
diff --git a/arch/powerpc/lib/crypto/Kconfig b/lib/crypto/powerpc/Kconfig
index 3f9e1bbd9905..3f9e1bbd9905 100644
--- a/arch/powerpc/lib/crypto/Kconfig
+++ b/lib/crypto/powerpc/Kconfig
diff --git a/arch/powerpc/lib/crypto/Makefile b/lib/crypto/powerpc/Makefile
index 27f231f8e334..27f231f8e334 100644
--- a/arch/powerpc/lib/crypto/Makefile
+++ b/lib/crypto/powerpc/Makefile
diff --git a/arch/powerpc/lib/crypto/chacha-p10-glue.c b/lib/crypto/powerpc/chacha-p10-glue.c
index fcd23c6f1590..fcd23c6f1590 100644
--- a/arch/powerpc/lib/crypto/chacha-p10-glue.c
+++ b/lib/crypto/powerpc/chacha-p10-glue.c
diff --git a/arch/powerpc/lib/crypto/chacha-p10le-8x.S b/lib/crypto/powerpc/chacha-p10le-8x.S
index b29562bd5d40..b29562bd5d40 100644
--- a/arch/powerpc/lib/crypto/chacha-p10le-8x.S
+++ b/lib/crypto/powerpc/chacha-p10le-8x.S
diff --git a/arch/powerpc/lib/crypto/poly1305-p10-glue.c b/lib/crypto/powerpc/poly1305-p10-glue.c
index 3f1664a724b6..3f1664a724b6 100644
--- a/arch/powerpc/lib/crypto/poly1305-p10-glue.c
+++ b/lib/crypto/powerpc/poly1305-p10-glue.c
diff --git a/arch/powerpc/lib/crypto/poly1305-p10le_64.S b/lib/crypto/powerpc/poly1305-p10le_64.S
index a3c1987f1ecd..a3c1987f1ecd 100644
--- a/arch/powerpc/lib/crypto/poly1305-p10le_64.S
+++ b/lib/crypto/powerpc/poly1305-p10le_64.S
diff --git a/arch/powerpc/lib/crypto/sha256-spe-asm.S b/lib/crypto/powerpc/sha256-spe-asm.S
index cd99d71dae34..cd99d71dae34 100644
--- a/arch/powerpc/lib/crypto/sha256-spe-asm.S
+++ b/lib/crypto/powerpc/sha256-spe-asm.S
diff --git a/arch/powerpc/lib/crypto/sha256.c b/lib/crypto/powerpc/sha256.c
index 6b0f079587eb..6b0f079587eb 100644
--- a/arch/powerpc/lib/crypto/sha256.c
+++ b/lib/crypto/powerpc/sha256.c