From 8dcc75dbbe0a7b82c7c9a9388a49d1e32723d8a9 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 19 Dec 2020 13:11:48 +0100 Subject: 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 Signed-off-by: Jason A. Donenfeld --- src/compat/simd/include/linux/simd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3