diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-12-13 18:30:31 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-12-13 18:30:31 +0100 |
commit | 52004fdfdbe81112294ce060ee986f693e0c6b29 (patch) | |
tree | 34a3315f2bd425bde38029ae09fdf5bac0af8d57 /src/crypto/chacha20poly1305.h | |
parent | wg-quick: dumber matching for default routes (diff) | |
download | wireguard-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 'src/crypto/chacha20poly1305.h')
-rw-r--r-- | src/crypto/chacha20poly1305.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/chacha20poly1305.h b/src/crypto/chacha20poly1305.h index 1e54594..8e7b886 100644 --- a/src/crypto/chacha20poly1305.h +++ b/src/crypto/chacha20poly1305.h @@ -58,7 +58,7 @@ bool __must_check xchacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t static inline bool chacha20poly1305_init_simd(void) { bool have_simd = false; -#if defined(CONFIG_X86_64) +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) have_simd = irq_fpu_usable(); if (have_simd) kernel_fpu_begin(); @@ -76,7 +76,7 @@ static inline bool chacha20poly1305_init_simd(void) static inline void chacha20poly1305_deinit_simd(bool was_on) { -#if defined(CONFIG_X86_64) +#if defined(CONFIG_X86_64) && !defined(CONFIG_UML) if (was_on) kernel_fpu_end(); #elif IS_ENABLED(CONFIG_KERNEL_MODE_NEON) |