diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-20 19:00:50 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-31 17:22:49 +0100 |
commit | cb71dee9a64ee3e18ce4002d9ca54d97d3d5a106 (patch) | |
tree | 31eb0334376b928558743b1d9296a0e2a0c59170 /src/crypto/chacha20poly1305.c | |
parent | ca0ecdcc7651ca41e40996ee0e377136e4a319bf (diff) |
crypto/avx: make sure we can actually use ymm registers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/chacha20poly1305.c')
-rw-r--r-- | src/crypto/chacha20poly1305.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/chacha20poly1305.c b/src/crypto/chacha20poly1305.c index 7227617..3163009 100644 --- a/src/crypto/chacha20poly1305.c +++ b/src/crypto/chacha20poly1305.c @@ -35,7 +35,7 @@ void chacha20poly1305_fpu_init(void) { chacha20poly1305_use_sse2 = boot_cpu_has(X86_FEATURE_XMM2); chacha20poly1305_use_ssse3 = boot_cpu_has(X86_FEATURE_SSSE3); - chacha20poly1305_use_avx2 = boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2); + chacha20poly1305_use_avx2 = boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL); } #elif IS_ENABLED(CONFIG_KERNEL_MODE_NEON) #include <asm/hwcap.h> |