summaryrefslogtreecommitdiffhomepage
path: root/src/compat/simd/include
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-03 18:38:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-03 18:38:22 +0200
commitbcee2a1b842d022187c3422f4ccc150048b15166 (patch)
treed159f17d3ac5ae5b69ff2439af5076f7eb3ebfb6 /src/compat/simd/include
parent0769875840b9941fd9929d75e7cc276d6ce96cd3 (diff)
simd: introduce useful disabling macro
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.h2
1 files changed, 2 insertions, 0 deletions
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;