crypto: lib/chacha - remove INTERNAL symbol and selection of CRYPTO
Now that the architecture-optimized ChaCha kconfig symbols are defined regardless of CRYPTO, there is no need for CRYPTO_LIB_CHACHA to select CRYPTO. So, remove that. This makes the indirection through the CRYPTO_LIB_CHACHA_INTERNAL symbol unnecessary, so get rid of that and just use CRYPTO_LIB_CHACHA directly. Finally, make the fallback to the generic implementation use a default value instead of a select; this makes it consistent with how the arch-optimized code gets enabled and also with how CRYPTO_LIB_BLAKE2S_GENERIC gets enabled. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>pull/1250/head
parent
c7c18c94a6
commit
879f47548b
|
|
@ -15,7 +15,7 @@ config CRYPTO_BLAKE2S_ARM
|
|||
|
||||
config CRYPTO_CHACHA20_NEON
|
||||
tristate
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
|
||||
config CRYPTO_POLY1305_ARM
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
config CRYPTO_CHACHA20_NEON
|
||||
tristate
|
||||
depends on KERNEL_MODE_NEON
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_LIB_CHACHA_GENERIC
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
config CRYPTO_CHACHA_MIPS
|
||||
tristate
|
||||
depends on CPU_MIPS32_R2
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
|
||||
config CRYPTO_POLY1305_MIPS
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
config CRYPTO_CHACHA20_P10
|
||||
tristate
|
||||
depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_LIB_CHACHA_GENERIC
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
config CRYPTO_CHACHA_RISCV64
|
||||
tristate
|
||||
depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
select CRYPTO_LIB_CHACHA_GENERIC
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
config CRYPTO_CHACHA_S390
|
||||
tristate
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_LIB_CHACHA_GENERIC
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ config CRYPTO_BLAKE2S_X86
|
|||
config CRYPTO_CHACHA20_X86_64
|
||||
tristate
|
||||
depends on 64BIT
|
||||
default CRYPTO_LIB_CHACHA_INTERNAL
|
||||
default CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_LIB_CHACHA_GENERIC
|
||||
select CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
|
||||
|
|
|
|||
|
|
@ -634,8 +634,8 @@ config CRYPTO_ARC4
|
|||
|
||||
config CRYPTO_CHACHA20
|
||||
tristate "ChaCha"
|
||||
select CRYPTO_LIB_CHACHA
|
||||
select CRYPTO_LIB_CHACHA_GENERIC
|
||||
select CRYPTO_LIB_CHACHA_INTERNAL
|
||||
select CRYPTO_SKCIPHER
|
||||
help
|
||||
The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
|
||||
|
|
|
|||
|
|
@ -50,22 +50,16 @@ config CRYPTO_ARCH_HAVE_LIB_CHACHA
|
|||
|
||||
config CRYPTO_LIB_CHACHA_GENERIC
|
||||
tristate
|
||||
default CRYPTO_LIB_CHACHA if !CRYPTO_ARCH_HAVE_LIB_CHACHA
|
||||
select CRYPTO_LIB_UTILS
|
||||
help
|
||||
This symbol can be depended upon by arch implementations of the
|
||||
ChaCha library interface that require the generic code as a
|
||||
fallback, e.g., for SIMD implementations. If no arch specific
|
||||
implementation is enabled, this implementation serves the users
|
||||
of CRYPTO_LIB_CHACHA.
|
||||
|
||||
config CRYPTO_LIB_CHACHA_INTERNAL
|
||||
tristate
|
||||
select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
|
||||
This symbol can be selected by arch implementations of the ChaCha
|
||||
library interface that require the generic code as a fallback, e.g.,
|
||||
for SIMD implementations. If no arch specific implementation is
|
||||
enabled, this implementation serves the users of CRYPTO_LIB_CHACHA.
|
||||
|
||||
config CRYPTO_LIB_CHACHA
|
||||
tristate
|
||||
select CRYPTO
|
||||
select CRYPTO_LIB_CHACHA_INTERNAL
|
||||
help
|
||||
Enable the ChaCha library interface. This interface may be fulfilled
|
||||
by either the generic implementation or an arch-specific one, if one
|
||||
|
|
|
|||
Loading…
Reference in New Issue