aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/chacha20poly1305.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/chacha20poly1305.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/chacha20poly1305.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crypto/chacha20poly1305.c b/src/crypto/chacha20poly1305.c
index 4173973..6be96f6 100644
--- a/src/crypto/chacha20poly1305.c
+++ b/src/crypto/chacha20poly1305.c
@@ -46,6 +46,7 @@ static bool chacha20poly1305_use_avx512vl __read_mostly;
void __init chacha20poly1305_fpu_init(void)
{
+#ifndef CONFIG_UML
chacha20poly1305_use_ssse3 = boot_cpu_has(X86_FEATURE_SSSE3);
chacha20poly1305_use_avx = boot_cpu_has(X86_FEATURE_AVX) &&
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
@@ -58,6 +59,7 @@ void __init chacha20poly1305_fpu_init(void)
chacha20poly1305_use_avx512vl = 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
}
#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
asmlinkage void poly1305_init_arm(void *ctx, const u8 key[16]);