diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-06-25 07:41:57 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-06-25 07:41:57 +0200 |
commit | febe8345353e8873e43f2c2c9792d062c770b22b (patch) | |
tree | a5c6e9f9e4a132febd6c6c92cc3f5974c865cdc9 | |
parent | sh64: Hook up page fault events for software perf counters. (diff) | |
download | linux-febe8345353e8873e43f2c2c9792d062c770b22b.tar.xz linux-febe8345353e8873e43f2c2c9792d062c770b22b.zip |
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>
-rw-r--r-- | tools/perf/perf.h | 10 |
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 @@ #define cpu_relax() asm volatile("" ::: "memory"); #endif +#ifdef __sh__ +#include "../../arch/sh/include/asm/unistd.h" +#if defined(__SH4A__) || defined(__SH5__) +# define rmb() asm volatile("synco" ::: "memory") +#else +# define rmb() asm volatile("" ::: "memory") +#endif +#define cpu_relax() asm volatile("" ::: "memory") +#endif + #include <time.h> #include <unistd.h> #include <sys/types.h> |