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 @@ | |||
| 47 | #define cpu_relax() asm volatile("":::"memory") | 47 | #define cpu_relax() asm volatile("":::"memory") |
| 48 | #endif | 48 | #endif |
| 49 | 49 | ||
| 50 | #ifdef __alpha__ | ||
| 51 | #include "../../arch/alpha/include/asm/unistd.h" | ||
| 52 | #define rmb() asm volatile("mb" ::: "memory") | ||
| 53 | #define cpu_relax() asm volatile("" ::: "memory") | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #ifdef __ia64__ | ||
| 57 | #include "../../arch/ia64/include/asm/unistd.h" | ||
| 58 | #define rmb() asm volatile ("mf" ::: "memory") | ||
| 59 | #define cpu_relax() asm volatile ("hint @pause" ::: "memory") | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #ifdef __arm__ | ||
| 63 | #include "../../arch/arm/include/asm/unistd.h" | ||
| 64 | /* | ||
| 65 | * Use the __kuser_memory_barrier helper in the CPU helper page. See | ||
| 66 | * arch/arm/kernel/entry-armv.S in the kernel source for details. | ||
| 67 | */ | ||
| 68 | #define rmb() ((void(*)(void))0xffff0fa0)() | ||
| 69 | #define cpu_relax() asm volatile("":::"memory") | ||
| 70 | #endif | ||
| 71 | |||
| 50 | #include <time.h> | 72 | #include <time.h> |
| 51 | #include <unistd.h> | 73 | #include <unistd.h> |
| 52 | #include <sys/types.h> | 74 | #include <sys/types.h> |
