]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - tools/perf/perf.h
perf, MIPS: Support cross compiling of tools/perf for MIPS
[net-next-2.6.git] / tools / perf / perf.h
index ef7aa0a0c5265191e8120e76f9f134b5e241fa53..95aaf565c704fb6ea67cee78d49e177f0ba8f595 100644 (file)
@@ -73,6 +73,18 @@ void get_term_dimensions(struct winsize *ws);
 #define cpu_relax()    asm volatile("":::"memory")
 #endif
 
+#ifdef __mips__
+#include "../../arch/mips/include/asm/unistd.h"
+#define rmb()          asm volatile(                                   \
+                               ".set   mips2\n\t"                      \
+                               "sync\n\t"                              \
+                               ".set   mips0"                          \
+                               : /* no output */                       \
+                               : /* no input */                        \
+                               : "memory")
+#define cpu_relax()    asm volatile("" ::: "memory")
+#endif
+
 #include <time.h>
 #include <unistd.h>
 #include <sys/types.h>