From b36800d1ba2dff8e9840dd982cf630b227ae307c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 3 Oct 2018 18:38:22 +0200 Subject: simd: introduce useful disabling macro --- src/compat/simd/include/linux/simd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compat') diff --git a/src/compat/simd/include/linux/simd.h b/src/compat/simd/include/linux/simd.h index f45aa1f..a117afd 100644 --- a/src/compat/simd/include/linux/simd.h +++ b/src/compat/simd/include/linux/simd.h @@ -22,6 +22,8 @@ typedef enum { HAVE_SIMD_IN_USE = 1 << 31 } simd_context_t; +#define DONT_USE_SIMD ((simd_context_t []){ HAVE_NO_SIMD }) + 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; -- cgit v1.2.3-59-g8ed1b