From: Paul Mundt Date: Thu, 25 Jun 2009 05:41:57 +0000 (+0900) Subject: perf_counter tools: add cpu_relax()/rmb() definitions for sh. X-Git-Tag: v2.6.31-rc2~17^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=febe8345353e8873e43f2c2c9792d062c770b22b;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- diff --git a/tools/perf/perf.h b/tools/perf/perf.h index ceb68aa..f735b69 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 #include #include