Commit d01dd270 authored by Herbert Xu's avatar Herbert Xu
Browse files

arm: Make simd.h more resilient



Add missing header inclusions and protect against double inclusion.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7ba8df47
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_SIMD_H
#define _ASM_SIMD_H

#include <linux/hardirq.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();
}

#endif	/* _ASM_SIMD_H */