aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/perf.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-22 18:05:48 +0200
committerPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-22 18:05:48 +0200
commit1d2f37945d1b3a14086c5ea802486778b635cf97 (patch)
treeb40a1a596a29acc1511f661c27f284dd06b0bc9d /tools/perf/perf.h
parent1483b19f8f5e8ad0c8816de368b099322dad4db5 (diff)
parentf1c6a58121f9846ac665b0fbd3cbab90ce8bcbac (diff)
Merge commit 'tip/perfcounters/core' into perf-counters-for-linus
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r--tools/perf/perf.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 27887c91643..53bb9550def 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -1,7 +1,13 @@
#ifndef _PERF_PERF_H
#define _PERF_PERF_H
-#if defined(__x86_64__) || defined(__i386__)
+#if defined(__i386__)
+#include "../../arch/x86/include/asm/unistd.h"
+#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
+#define cpu_relax() asm volatile("rep; nop" ::: "memory");
+#endif
+
+#if defined(__x86_64__)
#include "../../arch/x86/include/asm/unistd.h"
#define rmb() asm volatile("lfence" ::: "memory")
#define cpu_relax() asm volatile("rep; nop" ::: "memory");