config: add ARM PMUv3 for kernel 6.6
[openwrt/openwrt.git] / target / linux / generic / pending-5.15 / 100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 22 Oct 2020 22:00:03 +0200
3 Subject: [PATCH] compiler.h: only include asm/rwonce.h for kernel code
4
5 This header file is not in uapi, which makes any user space code that includes
6 linux/compiler.h to fail with the error 'asm/rwonce.h: No such file or directory'
7
8 Fixes: e506ea451254 ("compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h")
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/include/linux/compiler.h
13 +++ b/include/linux/compiler.h
14 @@ -220,6 +220,8 @@ void ftrace_likely_update(struct ftrace_
15 #define function_nocfi(x) (x)
16 #endif
17
18 +#include <asm/rwonce.h>
19 +
20 #endif /* __KERNEL__ */
21
22 /*
23 @@ -252,6 +254,4 @@ static inline void *offset_to_ptr(const
24 */
25 #define prevent_tail_call_optimization() mb()
26
27 -#include <asm/rwonce.h>
28 -
29 #endif /* __LINUX_COMPILER_H */