asm-generic: Make simd.h more resilient

Add missing header inclusions and protect against double inclusion.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu 2025-04-11 15:38:43 +08:00
parent 9b27a1b200
commit 7ba8df4781

View file

@ -1,6 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_GENERIC_SIMD_H
#define _ASM_GENERIC_SIMD_H
#include <linux/hardirq.h>
#include <linux/compiler_attributes.h>
#include <linux/preempt.h>
#include <linux/types.h>
/*
* may_use_simd - whether it is allowable at this time to issue SIMD
@ -13,3 +17,5 @@ static __must_check inline bool may_use_simd(void)
{
return !in_interrupt();
}
#endif /* _ASM_GENERIC_SIMD_H */