aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/blake2s.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-12-13 18:30:31 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-12-13 18:30:31 +0100
commit52004fdfdbe81112294ce060ee986f693e0c6b29 (patch)
tree34a3315f2bd425bde38029ae09fdf5bac0af8d57 /src/crypto/blake2s.c
parentwg-quick: dumber matching for default routes (diff)
downloadwireguard-monolithic-historical-52004fdfdbe81112294ce060ee986f693e0c6b29.tar.xz
wireguard-monolithic-historical-52004fdfdbe81112294ce060ee986f693e0c6b29.zip
crypto: compile on UML
We basically just don't use FPU in UML.
Diffstat (limited to '')
-rw-r--r--src/crypto/blake2s.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crypto/blake2s.c b/src/crypto/blake2s.c
index c0b95be..5c3f8f0 100644
--- a/src/crypto/blake2s.c
+++ b/src/crypto/blake2s.c
@@ -119,10 +119,12 @@ static bool blake2s_use_avx __read_mostly;
static bool blake2s_use_avx512 __read_mostly;
void __init blake2s_fpu_init(void)
{
+#ifndef CONFIG_UML
blake2s_use_avx = boot_cpu_has(X86_FEATURE_AVX) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
#ifndef COMPAT_CANNOT_USE_AVX512
blake2s_use_avx512 = boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX512F) && boot_cpu_has(X86_FEATURE_AVX512VL) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | XFEATURE_MASK_AVX512, NULL);
#endif
+#endif
}
#ifdef CONFIG_AS_AVX
asmlinkage void blake2s_compress_avx(struct blake2s_state *state, const u8 *block, size_t nblocks, u32 inc);