path: root/tools/perf/perf-sys.h
diff options
authorArnaldo Carvalho de Melo <>2015-04-30 12:33:22 -0300
committerArnaldo Carvalho de Melo <>2015-05-08 16:05:03 -0300
commit361c564eeff4b78f1303b86e8e8f07fc547bd2c9 (patch)
tree7a3d74423930cbc539766017a3ec9e88275e918b /tools/perf/perf-sys.h
parentf8bffbf1222a64336a81974fc25fe846656ac53e (diff)
perf tools: Move x86 barrier.h stuff to tools/arch/x86/include/asm/barrier.h
We will need it for atomic.h, so move it from the ad-hoc tools/perf/ place to a tools/ subset of the kernel arch/ hierarchy. Other aches will follow, each in a cset. Cc: Adrian Hunter <> Cc: Borislav Petkov <> Cc: David Ahern <> Cc: Don Zickus <> Cc: Frederic Weisbecker <> Cc: Jiri Olsa <> Cc: Namhyung Kim <> Cc: Stephane Eranian <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/perf-sys.h')
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h
index 6ef68165c9db..781d441cffd7 100644
--- a/tools/perf/perf-sys.h
+++ b/tools/perf/perf-sys.h
@@ -6,11 +6,9 @@
#include <sys/syscall.h>
#include <linux/types.h>
#include <linux/perf_event.h>
+#include <asm/barrier.h>
#if defined(__i386__)
-#define mb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
-#define wmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
-#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#define CPUINFO_PROC {"model name"}
#ifndef __NR_perf_event_open
@@ -25,9 +23,6 @@
#if defined(__x86_64__)
-#define mb() asm volatile("mfence" ::: "memory")
-#define wmb() asm volatile("sfence" ::: "memory")
-#define rmb() asm volatile("lfence" ::: "memory")
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
#define CPUINFO_PROC {"model name"}
#ifndef __NR_perf_event_open