xref: /linux/arch/arm/include/asm/simd.h (revision 4f372263ef92ed2af55a8c226750b72021ff8d0f)
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