Commit 4a329fec authored by Robert Elliott's avatar Robert Elliott Committed by Herbert Xu

crypto: Kconfig - submenus for arm and arm64

Move ARM- and ARM64-accelerated menus into a submenu under
the Crypto API menu (paralleling all the architectures).

Make each submenu always appear if the corresponding architecture
is supported. Get rid of the ARM_CRYPTO and ARM64_CRYPTO symbols.

The "ARM Accelerated" or "ARM64 Accelerated" entry disappears from:
    General setup  --->
    Platform selection  --->
    Kernel Features  --->
    Boot options  --->
    Power management options  --->
    CPU Power Management  --->
[*] ACPI (Advanced Configuration and Power Interface) Support  --->
[*] Virtualization  --->
[*] ARM Accelerated Cryptographic Algorithms  --->
     (or)
[*] ARM64 Accelerated Cryptographic Algorithms  --->
    ...
-*- Cryptographic API  --->
    Library routines  --->
    Kernel hacking  --->

and moves into the Cryptographic API menu, which now contains:
      ...
      Accelerated Cryptographic Algorithms for CPU (arm) --->
      (or)
      Accelerated Cryptographic Algorithms for CPU (arm64) --->
[*]   Hardware crypto devices  --->
      ...
Suggested-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarRobert Elliott <elliott@hpe.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5530acc8
...@@ -1921,8 +1921,4 @@ config ARCH_HIBERNATION_POSSIBLE ...@@ -1921,8 +1921,4 @@ config ARCH_HIBERNATION_POSSIBLE
endmenu endmenu
if CRYPTO
source "arch/arm/crypto/Kconfig"
endif
source "arch/arm/Kconfig.assembler" source "arch/arm/Kconfig.assembler"
...@@ -32,7 +32,6 @@ CONFIG_KERNEL_MODE_NEON=y ...@@ -32,7 +32,6 @@ CONFIG_KERNEL_MODE_NEON=y
CONFIG_PM_DEBUG=y CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_ENERGY_MODEL=y CONFIG_ENERGY_MODEL=y
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_SHA1_ARM_NEON=m
CONFIG_CRYPTO_SHA256_ARM=m CONFIG_CRYPTO_SHA256_ARM=m
CONFIG_CRYPTO_SHA512_ARM=m CONFIG_CRYPTO_SHA512_ARM=m
......
...@@ -44,7 +44,6 @@ CONFIG_ARM_CPUIDLE=y ...@@ -44,7 +44,6 @@ CONFIG_ARM_CPUIDLE=y
CONFIG_VFP=y CONFIG_VFP=y
CONFIG_NEON=y CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y CONFIG_KERNEL_MODE_NEON=y
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_SHA1_ARM_NEON=m
CONFIG_CRYPTO_SHA1_ARM_CE=m CONFIG_CRYPTO_SHA1_ARM_CE=m
CONFIG_CRYPTO_SHA2_ARM_CE=m CONFIG_CRYPTO_SHA2_ARM_CE=m
......
...@@ -132,7 +132,6 @@ CONFIG_ARM_EXYNOS_CPUIDLE=y ...@@ -132,7 +132,6 @@ CONFIG_ARM_EXYNOS_CPUIDLE=y
CONFIG_ARM_TEGRA_CPUIDLE=y CONFIG_ARM_TEGRA_CPUIDLE=y
CONFIG_ARM_QCOM_SPM_CPUIDLE=y CONFIG_ARM_QCOM_SPM_CPUIDLE=y
CONFIG_KERNEL_MODE_NEON=y CONFIG_KERNEL_MODE_NEON=y
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_SHA1_ARM_NEON=m
CONFIG_CRYPTO_SHA1_ARM_CE=m CONFIG_CRYPTO_SHA1_ARM_CE=m
CONFIG_CRYPTO_SHA2_ARM_CE=m CONFIG_CRYPTO_SHA2_ARM_CE=m
......
...@@ -53,7 +53,6 @@ CONFIG_CPU_IDLE=y ...@@ -53,7 +53,6 @@ CONFIG_CPU_IDLE=y
CONFIG_ARM_CPUIDLE=y CONFIG_ARM_CPUIDLE=y
CONFIG_KERNEL_MODE_NEON=y CONFIG_KERNEL_MODE_NEON=y
CONFIG_PM_DEBUG=y CONFIG_PM_DEBUG=y
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_SHA1_ARM_NEON=m
CONFIG_CRYPTO_SHA256_ARM=m CONFIG_CRYPTO_SHA256_ARM=m
CONFIG_CRYPTO_SHA512_ARM=m CONFIG_CRYPTO_SHA512_ARM=m
......
...@@ -34,7 +34,6 @@ CONFIG_CPUFREQ_DT=m ...@@ -34,7 +34,6 @@ CONFIG_CPUFREQ_DT=m
CONFIG_ARM_PXA2xx_CPUFREQ=m CONFIG_ARM_PXA2xx_CPUFREQ=m
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
CONFIG_ARM_CPUIDLE=y CONFIG_ARM_CPUIDLE=y
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM=m CONFIG_CRYPTO_SHA1_ARM=m
CONFIG_CRYPTO_SHA256_ARM=m CONFIG_CRYPTO_SHA256_ARM=m
CONFIG_CRYPTO_SHA512_ARM=m CONFIG_CRYPTO_SHA512_ARM=m
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
menuconfig ARM_CRYPTO menu "Accelerated Cryptographic Algorithms for CPU (arm)"
bool "ARM Accelerated Cryptographic Algorithms"
depends on ARM
help
Say Y here to choose from a selection of cryptographic algorithms
implemented using ARM specific CPU features or instructions.
if ARM_CRYPTO
config CRYPTO_SHA1_ARM config CRYPTO_SHA1_ARM
tristate "SHA1 digest algorithm (ARM-asm)" tristate "SHA1 digest algorithm (ARM-asm)"
...@@ -170,4 +163,4 @@ config CRYPTO_CURVE25519_NEON ...@@ -170,4 +163,4 @@ config CRYPTO_CURVE25519_NEON
select CRYPTO_LIB_CURVE25519_GENERIC select CRYPTO_LIB_CURVE25519_GENERIC
select CRYPTO_ARCH_HAVE_LIB_CURVE25519 select CRYPTO_ARCH_HAVE_LIB_CURVE25519
endif endmenu
...@@ -2215,6 +2215,3 @@ source "drivers/acpi/Kconfig" ...@@ -2215,6 +2215,3 @@ source "drivers/acpi/Kconfig"
source "arch/arm64/kvm/Kconfig" source "arch/arm64/kvm/Kconfig"
if CRYPTO
source "arch/arm64/crypto/Kconfig"
endif # CRYPTO
...@@ -109,7 +109,6 @@ CONFIG_ACPI_APEI_MEMORY_FAILURE=y ...@@ -109,7 +109,6 @@ CONFIG_ACPI_APEI_MEMORY_FAILURE=y
CONFIG_ACPI_APEI_EINJ=y CONFIG_ACPI_APEI_EINJ=y
CONFIG_VIRTUALIZATION=y CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y CONFIG_KVM=y
CONFIG_ARM64_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM64_CE=y CONFIG_CRYPTO_SHA1_ARM64_CE=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_SHA512_ARM64_CE=m CONFIG_CRYPTO_SHA512_ARM64_CE=m
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
menuconfig ARM64_CRYPTO menu "Accelerated Cryptographic Algorithms for CPU (arm64)"
bool "ARM64 Accelerated Cryptographic Algorithms"
depends on ARM64
help
Say Y here to choose from a selection of cryptographic algorithms
implemented using ARM64 specific CPU features or instructions.
if ARM64_CRYPTO
config CRYPTO_SHA256_ARM64 config CRYPTO_SHA256_ARM64
tristate "SHA-224/SHA-256 digest algorithm for arm64" tristate "SHA-224/SHA-256 digest algorithm for arm64"
...@@ -138,4 +131,4 @@ config CRYPTO_AES_ARM64_BS ...@@ -138,4 +131,4 @@ config CRYPTO_AES_ARM64_BS
select CRYPTO_AES_ARM64_NEON_BLK select CRYPTO_AES_ARM64_NEON_BLK
select CRYPTO_LIB_AES select CRYPTO_LIB_AES
endif endmenu
...@@ -1292,6 +1292,12 @@ config CRYPTO_STATS ...@@ -1292,6 +1292,12 @@ config CRYPTO_STATS
config CRYPTO_HASH_INFO config CRYPTO_HASH_INFO
bool bool
if ARM
source "arch/arm/crypto/Kconfig"
endif
if ARM64
source "arch/arm64/crypto/Kconfig"
endif
if MIPS if MIPS
source "arch/mips/crypto/Kconfig" source "arch/mips/crypto/Kconfig"
endif endif
......
...@@ -802,7 +802,6 @@ source "drivers/crypto/amlogic/Kconfig" ...@@ -802,7 +802,6 @@ source "drivers/crypto/amlogic/Kconfig"
config CRYPTO_DEV_SA2UL config CRYPTO_DEV_SA2UL
tristate "Support for TI security accelerator" tristate "Support for TI security accelerator"
depends on ARCH_K3 || COMPILE_TEST depends on ARCH_K3 || COMPILE_TEST
select ARM64_CRYPTO
select CRYPTO_AES select CRYPTO_AES
select CRYPTO_ALGAPI select CRYPTO_ALGAPI
select CRYPTO_AUTHENC select CRYPTO_AUTHENC
......
...@@ -85,8 +85,6 @@ config WIREGUARD ...@@ -85,8 +85,6 @@ config WIREGUARD
select CRYPTO_POLY1305_X86_64 if X86 && 64BIT select CRYPTO_POLY1305_X86_64 if X86 && 64BIT
select CRYPTO_BLAKE2S_X86 if X86 && 64BIT select CRYPTO_BLAKE2S_X86 if X86 && 64BIT
select CRYPTO_CURVE25519_X86 if X86 && 64BIT select CRYPTO_CURVE25519_X86 if X86 && 64BIT
select ARM_CRYPTO if ARM
select ARM64_CRYPTO if ARM64
select CRYPTO_CHACHA20_NEON if ARM || (ARM64 && KERNEL_MODE_NEON) select CRYPTO_CHACHA20_NEON if ARM || (ARM64 && KERNEL_MODE_NEON)
select CRYPTO_POLY1305_NEON if ARM64 && KERNEL_MODE_NEON select CRYPTO_POLY1305_NEON if ARM64 && KERNEL_MODE_NEON
select CRYPTO_POLY1305_ARM if ARM select CRYPTO_POLY1305_ARM if ARM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment