aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/blake2s.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-20 19:00:50 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-31 17:22:49 +0100
commitd467551e7983673472d3f8b6fbddb467104d4422 (patch)
tree0c6755c1b031ec4dcd41702568efb62527dca404 /src/crypto/blake2s.c
parentblake2: include headers for macros (diff)
downloadwireguard-monolithic-historical-d467551e7983673472d3f8b6fbddb467104d4422.tar.xz
wireguard-monolithic-historical-d467551e7983673472d3f8b6fbddb467104d4422.zip
crypto/avx: make sure we can actually use ymm registers
Diffstat (limited to '')
-rw-r--r--src/crypto/blake2s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/blake2s.c b/src/crypto/blake2s.c
index 1fe4600..ab37a0c 100644
--- a/src/crypto/blake2s.c
+++ b/src/crypto/blake2s.c
@@ -115,7 +115,7 @@ void blake2s_init_key(struct blake2s_state *state, const size_t outlen, const vo
static bool blake2s_use_avx __read_mostly = false;
void __init blake2s_fpu_init(void)
{
- blake2s_use_avx = boot_cpu_has(X86_FEATURE_AVX);
+ blake2s_use_avx = boot_cpu_has(X86_FEATURE_AVX) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
}
asmlinkage void blake2s_compress_avx(struct blake2s_state *state, const u8 * block, size_t nblocks, u32 inc);
#else