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 | 0462706042913d83317cdb4d21753f81eed2d48a (patch) | |
tree | bdf14753d9832f5761ada37c138cd39e3598111a /src/crypto/chacha20poly1305.h | |
parent | 656187fc998854ef0f6be764349679b7d390a523 (diff) |
crypto: compile on UML
We basically just don't use FPU in UML.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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) |