include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR
[sfrench/cifs-2.6.git] / include / linux / compiler.h
index fc5004a4b07d7b5b546e07f7d952fd1094892ead..445348facea97d2755f371198ca5730302c3f1ba 100644 (file)
@@ -161,7 +161,9 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
 #endif
 
 #ifndef OPTIMIZER_HIDE_VAR
-#define OPTIMIZER_HIDE_VAR(var) barrier()
+/* Make the optimizer believe the variable can be manipulated arbitrarily. */
+#define OPTIMIZER_HIDE_VAR(var)                                                \
+       __asm__ ("" : "=r" (var) : "0" (var))
 #endif
 
 /* Not-quite-unique ID. */