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 && !irqs_disabled(); 13 } 14 15 #endif /* _ASM_SIMD_H */ 16