aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-10-24 21:14:16 +0200
committerFelix Fietkau <nbd@nbd.name>2021-02-16 20:06:51 +0100
commitb10d6044599d8c1fa7fbb2374bcbf30118d39db1 (patch)
tree3fc84f92c14dfa7178487b71e1b8d63c2b688439 /target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
parent299b8554183791b325e393c880d32360d7d72f73 (diff)
downloadupstream-b10d6044599d8c1fa7fbb2374bcbf30118d39db1.tar.gz
upstream-b10d6044599d8c1fa7fbb2374bcbf30118d39db1.tar.bz2
upstream-b10d6044599d8c1fa7fbb2374bcbf30118d39db1.zip
kernel: add linux 5.10 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch')
-rw-r--r--target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch b/target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
new file mode 100644
index 0000000000..39b98eac1b
--- /dev/null
+++ b/target/linux/generic/pending-5.10/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
@@ -0,0 +1,29 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Thu, 22 Oct 2020 22:00:03 +0200
+Subject: [PATCH] compiler.h: only include asm/rwonce.h for kernel code
+
+This header file is not in uapi, which makes any user space code that includes
+linux/compiler.h to fail with the error 'asm/rwonce.h: No such file or directory'
+
+Fixes: e506ea451254 ("compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h")
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/linux/compiler.h
++++ b/include/linux/compiler.h
+@@ -211,6 +211,8 @@ void ftrace_likely_update(struct ftrace_
+ __v; \
+ })
+
++#include <asm/rwonce.h>
++
+ #endif /* __KERNEL__ */
+
+ /*
+@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const
+ */
+ #define prevent_tail_call_optimization() mb()
+
+-#include <asm/rwonce.h>
+-
+ #endif /* __LINUX_COMPILER_H */