perf tools: Move ACCESS_ONCE from perf.h header
authorJiri Olsa <[email protected]>
Mon, 5 May 2014 11:16:41 +0000 (13:16 +0200)
committerJiri Olsa <[email protected]>
Mon, 5 May 2014 15:49:07 +0000 (17:49 +0200)
Into tools/include/linux/compiler.h header.

Acked-by: Arnaldo Carvalho de Melo <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Jiri Olsa <[email protected]>
tools/include/linux/compiler.h
tools/perf/perf.h

index fbc6665c6d53e8f8c9f9caf91e32d48a35277573..88461f09cc860b0d17ab87c3d4a629ee44214af7 100644 (file)
@@ -35,4 +35,6 @@
 # define unlikely(x)           __builtin_expect(!!(x), 0)
 #endif
 
+#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
+
 #endif /* _TOOLS_LINUX_COMPILER_H */
index 813571b07246b694d7595195f568bd788f219fbb..510c65f72858fb09fcdad8a5c21ba7bb732747d6 100644 (file)
@@ -14,8 +14,6 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
 #define HAVE_ATTR_TEST
 #include "perf-sys.h"
 
-#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
-
 #ifndef NSEC_PER_SEC
 # define NSEC_PER_SEC                  1000000000ULL
 #endif