1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-13 20:01:55 +00:00
openmptcprouter/root/target/linux/generic/pending-5.14/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch

30 lines
842 B
Diff
Raw Normal View History

2021-09-27 16:18:30 +00:00
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
2021-10-18 14:01:57 +00:00
@@ -231,6 +231,8 @@ void ftrace_likely_update(struct ftrace_
#define function_nocfi(x) (x)
#endif
2021-09-27 16:18:30 +00:00
+#include <asm/rwonce.h>
+
#endif /* __KERNEL__ */
/*
2021-10-18 14:01:57 +00:00
@@ -263,6 +265,4 @@ static inline void *offset_to_ptr(const
2021-09-27 16:18:30 +00:00
*/
#define prevent_tail_call_optimization() mb()
-#include <asm/rwonce.h>
-
#endif /* __LINUX_COMPILER_H */