aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf-sys.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-04-30 11:33:22 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-08 15:05:03 -0400
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 <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-vy6bqmsvm6puibpay2cy4wid@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf-sys.h')
-rw-r--r--tools/perf/perf-sys.h7
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 @@
6#include <sys/syscall.h> 6#include <sys/syscall.h>
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/perf_event.h> 8#include <linux/perf_event.h>
9#include <asm/barrier.h>
9 10
10#if defined(__i386__) 11#if defined(__i386__)
11#define mb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
12#define wmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
13#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
14#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 12#define cpu_relax() asm volatile("rep; nop" ::: "memory");
15#define CPUINFO_PROC {"model name"} 13#define CPUINFO_PROC {"model name"}
16#ifndef __NR_perf_event_open 14#ifndef __NR_perf_event_open
@@ -25,9 +23,6 @@
25#endif 23#endif
26 24
27#if defined(__x86_64__) 25#if defined(__x86_64__)
28#define mb() asm volatile("mfence" ::: "memory")
29#define wmb() asm volatile("sfence" ::: "memory")
30#define rmb() asm volatile("lfence" ::: "memory")
31#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 26#define cpu_relax() asm volatile("rep; nop" ::: "memory");
32#define CPUINFO_PROC {"model name"} 27#define CPUINFO_PROC {"model name"}
33#ifndef __NR_perf_event_open 28#ifndef __NR_perf_event_open