]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
crypto: s390 - move library functions to arch/s390/lib/crypto/
authorEric Biggers <ebiggers@google.com>
Tue, 22 Apr 2025 15:27:13 +0000 (08:27 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Apr 2025 11:40:53 +0000 (19:40 +0800)
Continue disentangling the crypto library functions from the generic
crypto infrastructure by moving the s390 ChaCha library functions into a
new directory arch/s390/lib/crypto/ that does not depend on CRYPTO.
This mirrors the distinction between crypto/ and lib/crypto/.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/s390/crypto/Kconfig
arch/s390/crypto/Makefile
arch/s390/lib/Makefile
arch/s390/lib/crypto/Kconfig [new file with mode: 0644]
arch/s390/lib/crypto/Makefile [new file with mode: 0644]
arch/s390/lib/crypto/chacha-glue.c [moved from arch/s390/crypto/chacha-glue.c with 100% similarity]
arch/s390/lib/crypto/chacha-s390.S [moved from arch/s390/crypto/chacha-s390.S with 100% similarity]
arch/s390/lib/crypto/chacha-s390.h [moved from arch/s390/crypto/chacha-s390.h with 100% similarity]
lib/crypto/Kconfig

index e88d9cd256ef5189b1f1e0828581881428bf8ece..a2bfd6eef0ca3674cbf2fc7c13486e82cd0b6eb8 100644 (file)
@@ -99,12 +99,6 @@ config CRYPTO_DES_S390
          As of z990 the ECB and CBC mode are hardware accelerated.
          As of z196 the CTR mode is hardware accelerated.
 
-config CRYPTO_CHACHA_S390
-       tristate
-       select CRYPTO_LIB_CHACHA_GENERIC
-       select CRYPTO_ARCH_HAVE_LIB_CHACHA
-       default CRYPTO_LIB_CHACHA_INTERNAL
-
 config CRYPTO_HMAC_S390
        tristate "Keyed-hash message authentication code: HMAC"
        select CRYPTO_HASH
index 14dafadbcbed4718af6abf5e4a93677830564440..e3853774e1a3a4d6ff363b5a1a523879aeb790f0 100644 (file)
@@ -11,10 +11,7 @@ obj-$(CONFIG_CRYPTO_SHA3_512_S390) += sha3_512_s390.o sha_common.o
 obj-$(CONFIG_CRYPTO_DES_S390) += des_s390.o
 obj-$(CONFIG_CRYPTO_AES_S390) += aes_s390.o
 obj-$(CONFIG_CRYPTO_PAES_S390) += paes_s390.o
-obj-$(CONFIG_CRYPTO_CHACHA_S390) += chacha_s390.o
 obj-$(CONFIG_S390_PRNG) += prng.o
 obj-$(CONFIG_CRYPTO_GHASH_S390) += ghash_s390.o
 obj-$(CONFIG_CRYPTO_HMAC_S390) += hmac_s390.o
 obj-y += arch_random.o
-
-chacha_s390-y := chacha-glue.o chacha-s390.o
index 14bbfe50033c7c0591bf699608cb410975c31621..fce4edbe8a078ac1dfeef006b6b4b2e17e1c6fda 100644 (file)
@@ -3,6 +3,7 @@
 # Makefile for s390-specific library files..
 #
 
+obj-y += crypto/
 lib-y += delay.o string.o uaccess.o find.o spinlock.o tishift.o
 lib-y += csum-partial.o
 obj-y += mem.o xor.o
diff --git a/arch/s390/lib/crypto/Kconfig b/arch/s390/lib/crypto/Kconfig
new file mode 100644 (file)
index 0000000..b79fd91
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config CRYPTO_CHACHA_S390
+       tristate
+       default CRYPTO_LIB_CHACHA_INTERNAL
+       select CRYPTO_LIB_CHACHA_GENERIC
+       select CRYPTO_ARCH_HAVE_LIB_CHACHA
diff --git a/arch/s390/lib/crypto/Makefile b/arch/s390/lib/crypto/Makefile
new file mode 100644 (file)
index 0000000..06c2cf7
--- /dev/null
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-$(CONFIG_CRYPTO_CHACHA_S390) += chacha_s390.o
+chacha_s390-y := chacha-glue.o chacha-s390.o
index 0b06c25eb38a5a83a8ec745c011a44efaf1a26df..db19a7acc2fbfc2a08fabd852ce98af0a0657e03 100644 (file)
@@ -171,6 +171,9 @@ endif
 if RISCV
 source "arch/riscv/lib/crypto/Kconfig"
 endif
+if S390
+source "arch/s390/lib/crypto/Kconfig"
+endif
 endif
 
 endmenu