* [PATCH] lib/crypto: x86/chacha: Drop redundant check for AVX
@ 2026-11-11 20:15 Eric Biggers
2026-11-13 8:29 ` Ard Biesheuvel
2026-11-14 4:23 ` Eric Biggers
0 siblings, 2 replies; 3+ messages in thread
From: Eric Biggers @ 2026-11-11 20:15 UTC (permalink / raw)
To: linux-crypto
Cc: Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu, x86,
Eric Biggers
X86_FEATURE_AVX2 implies X86_FEATURE_AVX. Simplify
chacha_mod_init_arch() accordingly.
(Note: as usual, arch/x86/kernel/cpu/cpuid-deps.c is non-enforcing: if a
dependency isn't met, it warns and doesn't prevent booting. However,
that case doesn't occur in real CPUs and is unsupported.)
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
lib/crypto/x86/chacha.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/crypto/x86/chacha.h b/lib/crypto/x86/chacha.h
index 76cddc522fa04..3e465184ca87b 100644
--- a/lib/crypto/x86/chacha.h
+++ b/lib/crypto/x86/chacha.h
@@ -188,8 +188,7 @@ static void chacha_mod_init_arch(void)
static_branch_enable(&chacha_use_simd);
- if (boot_cpu_has(X86_FEATURE_AVX) &&
- boot_cpu_has(X86_FEATURE_AVX2)) {
+ if (boot_cpu_has(X86_FEATURE_AVX2)) {
static_branch_enable(&chacha_use_avx2);
if (boot_cpu_has(X86_FEATURE_AVX512VL) &&
base-commit: 33b4f31b1aea3f62b61c892daefc0e6a77859032
--
2.56.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lib/crypto: x86/chacha: Drop redundant check for AVX
2026-11-11 20:15 [PATCH] lib/crypto: x86/chacha: Drop redundant check for AVX Eric Biggers
@ 2026-11-13 8:29 ` Ard Biesheuvel
2026-11-14 4:23 ` Eric Biggers
1 sibling, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2026-11-13 8:29 UTC (permalink / raw)
To: Eric Biggers, linux-crypto; +Cc: Jason A . Donenfeld, Herbert Xu, x86
On Wed, 11 Nov 2026, at 21:15, Eric Biggers wrote:
> X86_FEATURE_AVX2 implies X86_FEATURE_AVX. Simplify
> chacha_mod_init_arch() accordingly.
>
> (Note: as usual, arch/x86/kernel/cpu/cpuid-deps.c is non-enforcing: if a
> dependency isn't met, it warns and doesn't prevent booting. However,
> that case doesn't occur in real CPUs and is unsupported.)
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> lib/crypto/x86/chacha.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib/crypto: x86/chacha: Drop redundant check for AVX
2026-11-11 20:15 [PATCH] lib/crypto: x86/chacha: Drop redundant check for AVX Eric Biggers
2026-11-13 8:29 ` Ard Biesheuvel
@ 2026-11-14 4:23 ` Eric Biggers
1 sibling, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2026-11-14 4:23 UTC (permalink / raw)
To: linux-crypto; +Cc: Ard Biesheuvel, Jason A . Donenfeld, Herbert Xu, x86
On Wed, Nov 11, 2026 at 12:15:17PM -0800, Eric Biggers wrote:
> X86_FEATURE_AVX2 implies X86_FEATURE_AVX. Simplify
> chacha_mod_init_arch() accordingly.
>
> (Note: as usual, arch/x86/kernel/cpu/cpuid-deps.c is non-enforcing: if a
> dependency isn't met, it warns and doesn't prevent booting. However,
> that case doesn't occur in real CPUs and is unsupported.)
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> lib/crypto/x86/chacha.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-14 4:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 20:15 [PATCH] lib/crypto: x86/chacha: Drop redundant check for AVX Eric Biggers
2026-11-13 8:29 ` Ard Biesheuvel
2026-11-14 4:23 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox