From: Petr Vorel <pvorel@suse.cz>
To: linux-crypto@vger.kernel.org
Cc: Petr Vorel <pvorel@suse.cz>, Nicolai Stange <nstange@suse.de>,
Herbert Xu <herbert@gondor.apana.org.au>,
leitao@debian.org, Nayna Jain <nayna@linux.ibm.com>,
Paulo Flabiano Smorigo <pfsmorigo@gmail.com>,
linuxppc-dev@lists.ozlabs.org, linux-kbuild@vger.kernel.org
Subject: [PATCH v3 1/2] crypto: vmx - merge CRYPTO_DEV_VMX_ENCRYPT into CRYPTO_DEV_VMX
Date: Thu, 17 Feb 2022 11:57:50 +0100 [thread overview]
Message-ID: <20220217105751.6330-2-pvorel@suse.cz> (raw)
In-Reply-To: <20220217105751.6330-1-pvorel@suse.cz>
CRYPTO_DEV_VMX_ENCRYPT is redundant with CRYPTO_DEV_VMX.
And it also forces CRYPTO_GHASH to be builtin even
CRYPTO_DEV_VMX_ENCRYPT was configured as module.
This requires to change defconfig values to m for backwards
compatibility.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
changes v2->v3:
* keep CRYPTO_DEV_VMX and merge CRYPTO_DEV_VMX_ENCRYPT into it instead
of vice versa (suggested by Nicolai). I have no problem to send
another version if maintainers want the original approach.
* change commit subject to be compatible
* remove MAINTAINERS changes
arch/powerpc/configs/powernv_defconfig | 2 +-
arch/powerpc/configs/ppc64_defconfig | 2 +-
arch/powerpc/configs/pseries_defconfig | 2 +-
drivers/crypto/Kconfig | 9 +++++----
drivers/crypto/vmx/Kconfig | 10 ----------
drivers/crypto/vmx/Makefile | 4 ++--
6 files changed, 10 insertions(+), 19 deletions(-)
delete mode 100644 drivers/crypto/vmx/Kconfig
diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
index 49f49c263935..661b294d1744 100644
--- a/arch/powerpc/configs/powernv_defconfig
+++ b/arch/powerpc/configs/powernv_defconfig
@@ -337,7 +337,7 @@ CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_DEV_NX=y
-CONFIG_CRYPTO_DEV_VMX=y
+CONFIG_CRYPTO_DEV_VMX=m
CONFIG_VIRTUALIZATION=y
CONFIG_KVM_BOOK3S_64=m
CONFIG_KVM_BOOK3S_64_HV=m
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index c8b0e80d613b..cc51b506066c 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -355,7 +355,7 @@ CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_DEV_NX=y
CONFIG_CRYPTO_DEV_NX_ENCRYPT=m
-CONFIG_CRYPTO_DEV_VMX=y
+CONFIG_CRYPTO_DEV_VMX=m
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
CONFIG_MAGIC_SYSRQ=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index b571d084c148..2366d3be0d11 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -315,7 +315,7 @@ CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_DEV_NX=y
CONFIG_CRYPTO_DEV_NX_ENCRYPT=m
-CONFIG_CRYPTO_DEV_VMX=y
+CONFIG_CRYPTO_DEV_VMX=m
CONFIG_VIRTUALIZATION=y
CONFIG_KVM_BOOK3S_64=m
CONFIG_KVM_BOOK3S_64_HV=m
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 4f705674f94f..923fa1effb4a 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -762,12 +762,13 @@ config CRYPTO_DEV_QCOM_RNG
module will be called qcom-rng. If unsure, say N.
config CRYPTO_DEV_VMX
- bool "Support for VMX cryptographic acceleration instructions"
+ tristate "Power VMX cryptographic acceleration instructions driver"
depends on PPC64 && VSX
+ select CRYPTO_GHASH
help
- Support for VMX cryptographic acceleration instructions.
-
-source "drivers/crypto/vmx/Kconfig"
+ Support for VMX cryptographic acceleration instructions on Power8 CPU.
+ This module supports acceleration for AES and GHASH in hardware. If you
+ choose 'M' here, this module will be called vmx-crypto.
config CRYPTO_DEV_IMGTEC_HASH
tristate "Imagination Technologies hardware hash accelerator"
diff --git a/drivers/crypto/vmx/Kconfig b/drivers/crypto/vmx/Kconfig
deleted file mode 100644
index c85fab7ef0bd..000000000000
--- a/drivers/crypto/vmx/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-config CRYPTO_DEV_VMX_ENCRYPT
- tristate "Encryption acceleration support on P8 CPU"
- depends on CRYPTO_DEV_VMX
- select CRYPTO_GHASH
- default m
- help
- Support for VMX cryptographic acceleration instructions on Power8 CPU.
- This module supports acceleration for AES and GHASH in hardware. If you
- choose 'M' here, this module will be called vmx-crypto.
diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
index 709670d2b553..703f67b8459e 100644
--- a/drivers/crypto/vmx/Makefile
+++ b/drivers/crypto/vmx/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
+obj-$(CONFIG_CRYPTO_DEV_VMX) += vmx-crypto.o
vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
@@ -15,7 +15,7 @@ targets += aesp8-ppc.S ghashp8-ppc.S
$(obj)/aesp8-ppc.S: $(src)/aesp8-ppc.pl FORCE
$(call if_changed,perl)
-
+
$(obj)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl FORCE
$(call if_changed,perl)
--
2.35.1
next prev parent reply other threads:[~2022-02-17 10:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 10:57 [PATCH v3 0/2] vmx-crypto: Add missing dependencies Petr Vorel
2022-02-17 10:57 ` Petr Vorel [this message]
2022-02-23 2:57 ` [PATCH v3 1/2] crypto: vmx - merge CRYPTO_DEV_VMX_ENCRYPT into CRYPTO_DEV_VMX Herbert Xu
2022-02-23 15:09 ` Petr Vorel
2022-02-17 10:57 ` [PATCH v3 2/2] crypto: vmx - add missing dependencies Petr Vorel
2022-02-23 2:58 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220217105751.6330-2-pvorel@suse.cz \
--to=pvorel@suse.cz \
--cc=herbert@gondor.apana.org.au \
--cc=leitao@debian.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nayna@linux.ibm.com \
--cc=nstange@suse.de \
--cc=pfsmorigo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).