From: Deng-Cheng Zhu Date: Tue, 12 Oct 2010 11:33:33 +0000 (+0800) Subject: perf, MIPS: Support cross compiling of tools/perf for MIPS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c1e028ef40b8d6943b767028ba17d4f2ba020edb;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Acked-by: Ralf Baechle Cc: David Daney Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Paul Mackerras Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/perf.h b/tools/perf/perf.h index ef7aa0a0c526..95aaf565c704 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 #include #include