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.c | |
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.c')
-rw-r--r-- | src/crypto/chacha20poly1305.c | 2 |
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]); |