xref: /linux/arch/arm/include/asm/simd.h (revision dee264c16a6334dcdbea5c186f5ff35f98b1df42)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_SIMD_H
3 #define _ASM_SIMD_H
4 
5 #include <linux/compiler_attributes.h>
6 #include <linux/preempt.h>
7 #include <linux/types.h>
8 
9 static __must_check inline bool may_use_simd(void)
10 {
11 	return IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && !in_hardirq();
12 }
13 
14 #endif	/* _ASM_SIMD_H */
15