asm-generic: Make simd.h more resilient
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Apr 2025 07:38:43 +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>
include/asm-generic/simd.h

index d0343d58a74a19460bc3c03e7eb7073ae11261fa..ac29a22eb7cff718da89363eac9462b4b5464509 100644 (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 */