x86: Make simd.h more resilient
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Apr 2025 07:38:47 +0000 (15:38 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 16 Apr 2025 07:36:23 +0000 (15:36 +0800)
Add missing header inclusions and protect against double inclusion.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/include/asm/simd.h

index a341c878e977f859a7536043235ec1b780c1743c..b8027b63cd7a4ea722f13fc8982dc0d5d45f47e6 100644 (file)
@@ -1,6 +1,10 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_SIMD_H
+#define _ASM_SIMD_H
 
 #include <asm/fpu/api.h>
+#include <linux/compiler_attributes.h>
+#include <linux/types.h>
 
 /*
  * may_use_simd - whether it is allowable at this time to issue SIMD
@@ -10,3 +14,5 @@ static __must_check inline bool may_use_simd(void)
 {
        return irq_fpu_usable();
 }
+
+#endif /* _ASM_SIMD_H */