Commit-ID: c1e028ef40b8d6943b767028ba17d4f2ba020edb Gitweb: http://git.kernel.org/tip/c1e028ef40b8d6943b767028ba17d4f2ba020edb Author: Deng-Cheng Zhu <dengcheng.zhu@xxxxxxxxx> AuthorDate: Tue, 12 Oct 2010 19:33:33 +0800 Committer: Ingo Molnar <mingo@xxxxxxx> CommitDate: Tue, 12 Oct 2010 13:34:37 +0200 perf, MIPS: Support cross compiling of tools/perf for MIPS Changes: v4: Fix the cosmetic issue of redundant dot-ops v3: Change rmb() to use SYNC v2: Include mips unistd.h and define rmb()/cpu_relax() in tools/perf/perf.h Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@xxxxxxxxx> Acked-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: David Daney <ddaney@xxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> --- tools/perf/perf.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tools/perf/perf.h b/tools/perf/perf.h index ef7aa0a..95aaf56 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -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> -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html