diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-12-19 13:11:48 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-12-19 13:11:48 +0100 |
commit | 8dcc75dbbe0a7b82c7c9a9388a49d1e32723d8a9 (patch) | |
tree | e1ad418df8affe71698827debf75ea2b3a1b8ef3 /src/compat/simd/include | |
parent | d2faea81c32ce04d061237e34cfad3c36e93be35 (diff) |
simd: detect -rt kernels >= 5.4
The 5.4 series of -rt kernels moved from PREEMPT_RT_BASE/PREEMPT_RT_FULL
to PREEMPT_RT, so we have to account for it here. Otherwise users get
scheduling-while-atomic splats.
Reported-by: Erik Schuitema <erik@essd.nl>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/simd/include')
-rw-r--r-- | src/compat/simd/include/linux/simd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compat/simd/include/linux/simd.h b/src/compat/simd/include/linux/simd.h index c75c724..3ff8a02 100644 --- a/src/compat/simd/include/linux/simd.h +++ b/src/compat/simd/include/linux/simd.h @@ -25,7 +25,7 @@ typedef enum { static inline void simd_get(simd_context_t *ctx) { - *ctx = !IS_ENABLED(CONFIG_PREEMPT_RT_BASE) && may_use_simd() ? HAVE_FULL_SIMD : HAVE_NO_SIMD; + *ctx = !IS_ENABLED(CONFIG_PREEMPT_RT) && !IS_ENABLED(CONFIG_PREEMPT_RT_BASE) && may_use_simd() ? HAVE_FULL_SIMD : HAVE_NO_SIMD; } static inline void simd_put(simd_context_t *ctx) |