summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/simd.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/simd.h')
-rw-r--r--arch/arm/include/asm/simd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/simd.h b/arch/arm/include/asm/simd.h
new file mode 100644
index 0000000000..82191dbd7e
--- /dev/null
+++ b/arch/arm/include/asm/simd.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#include <linux/hardirq.h>
+
+static __must_check inline bool may_use_simd(void)
+{
+ return IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && !in_hardirq();
+}