aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/simd.h
blob: be08a8da046f92f90c7b1c74cec37a8c54170676 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_SIMD_H
#define _ASM_SIMD_H

#include <linux/compiler_attributes.h>
#include <linux/preempt.h>
#include <linux/types.h>

static __must_check inline bool may_use_simd(void)
{
	return IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && !in_hardirq()
	       && !irqs_disabled();
}

#endif	/* _ASM_SIMD_H */