aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-06-25 01:41:57 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-25 01:41:57 -0400
commitfebe8345353e8873e43f2c2c9792d062c770b22b (patch)
treea5c6e9f9e4a132febd6c6c92cc3f5974c865cdc9 /tools/perf/perf.h
parent163b2f0ba93e9298b3d5fff2337d860c3872ec60 (diff)
perf_counter tools: add cpu_relax()/rmb() definitions for sh.
Simple cpu_relax()/rmb() stubs that perf needs, which were inadvertently omitted from the sh HAVE_PERF_COUNTERS patch. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r--tools/perf/perf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index ceb68aa51f7f..f735b6924a2f 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -19,6 +19,16 @@
19#define cpu_relax() asm volatile("" ::: "memory"); 19#define cpu_relax() asm volatile("" ::: "memory");
20#endif 20#endif
21 21
22#ifdef __sh__
23#include "../../arch/sh/include/asm/unistd.h"
24#if defined(__SH4A__) || defined(__SH5__)
25# define rmb() asm volatile("synco" ::: "memory")
26#else
27# define rmb() asm volatile("" ::: "memory")
28#endif
29#define cpu_relax() asm volatile("" ::: "memory")
30#endif
31
22#include <time.h> 32#include <time.h>
23#include <unistd.h> 33#include <unistd.h>
24#include <sys/types.h> 34#include <sys/types.h>