openwrt/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
John Audia efe9fb0846 kernel: bump 6.6 to 6.6.67
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.67

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17309
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-20 19:34:47 +01:00

30 lines
824 B
Diff

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
@@ -202,6 +202,8 @@ void ftrace_likely_update(struct ftrace_
__v; \
})
+#include <asm/rwonce.h>
+
#endif /* __KERNEL__ */
/**
@@ -258,6 +260,4 @@ static inline void *offset_to_ptr(const
*/
#define prevent_tail_call_optimization() mb()
-#include <asm/rwonce.h>
-
#endif /* __LINUX_COMPILER_H */