From: Johannes Berg <johannes.berg@xxxxxxxxx> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- backport/backport-include/linux/compiler-gccN.h | 4 ++++ backport/backport-include/linux/compiler.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/backport/backport-include/linux/compiler-gccN.h b/backport/backport-include/linux/compiler-gccN.h index 23ad803dce0b..97e7541d1ab1 100644 --- a/backport/backport-include/linux/compiler-gccN.h +++ b/backport/backport-include/linux/compiler-gccN.h @@ -120,3 +120,7 @@ #endif #endif /* gcc version >= 40000 specific checks */ + +#ifndef OPTIMIZER_HIDE_VAR +#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var)) +#endif diff --git a/backport/backport-include/linux/compiler.h b/backport/backport-include/linux/compiler.h index e5af565b13dc..53c069df10a8 100644 --- a/backport/backport-include/linux/compiler.h +++ b/backport/backport-include/linux/compiler.h @@ -88,4 +88,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s }) #endif +#ifndef OPTIMIZER_HIDE_VAR +#define OPTIMIZER_HIDE_VAR(var) barrier() +#endif + #endif /* __BACKPORT_LINUX_COMPILER_H */ -- 2.14.2 -- To unsubscribe from this list: send the line "unsubscribe backports" in