diff options
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r-- | tools/perf/perf.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 8cc4623afd6f..6fb379bc1d1f 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -47,6 +47,28 @@ #define cpu_relax() asm volatile("":::"memory") #endif +#ifdef __alpha__ +#include "../../arch/alpha/include/asm/unistd.h" +#define rmb() asm volatile("mb" ::: "memory") +#define cpu_relax() asm volatile("" ::: "memory") +#endif + +#ifdef __ia64__ +#include "../../arch/ia64/include/asm/unistd.h" +#define rmb() asm volatile ("mf" ::: "memory") +#define cpu_relax() asm volatile ("hint @pause" ::: "memory") +#endif + +#ifdef __arm__ +#include "../../arch/arm/include/asm/unistd.h" +/* + * Use the __kuser_memory_barrier helper in the CPU helper page. See + * arch/arm/kernel/entry-armv.S in the kernel source for details. + */ +#define rmb() ((void(*)(void))0xffff0fa0)() +#define cpu_relax() asm volatile("":::"memory") +#endif + #include <time.h> #include <unistd.h> #include <sys/types.h> |