diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-16 16:36:04 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-17 19:36:37 +0200 |
commit | 469fe2e3ee962c95cad57f2a30ca3e20a34b5244 (patch) | |
tree | d943652a5eaa8d82fcbeecbe5a9f5732ec8fcc74 | |
parent | 3f62999e8e27a7f315ef9346f34885d76334575a (diff) |
simd: no need to restore fpu state when no preemption
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/crypto/simd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crypto/simd.h b/src/crypto/simd.h index 21e3c55..07936bf 100644 --- a/src/crypto/simd.h +++ b/src/crypto/simd.h @@ -47,10 +47,12 @@ static inline void simd_put(bool was_on) static inline bool simd_relax(bool was_on) { +#ifdef CONFIG_PREEMPT if (was_on && need_resched()) { simd_put(true); return simd_get(); } +#endif return was_on; } |