Skip to content

Commit 7ba8df4

Browse files
committed
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>
1 parent 9b27a1b commit 7ba8df4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/asm-generic/simd.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASM_GENERIC_SIMD_H
3+
#define _ASM_GENERIC_SIMD_H
24

3-
#include <linux/hardirq.h>
5+
#include <linux/compiler_attributes.h>
6+
#include <linux/preempt.h>
7+
#include <linux/types.h>
48

59
/*
610
* 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)
1317
{
1418
return !in_interrupt();
1519
}
20+
21+
#endif /* _ASM_GENERIC_SIMD_H */

0 commit comments

Comments
 (0)