From 34b4919187602186ecc8c163313f9046e6052a12 Mon Sep 17 00:00:00 2001 From: Deng-Cheng Zhu Date: Tue, 12 Oct 2010 19:33:33 +0800 Subject: [PATCH] --- yaml --- r: 211485 b: refs/heads/master c: c1e028ef40b8d6943b767028ba17d4f2ba020edb h: refs/heads/master i: 211483: 0e8567ae68474f1adc38ab54011a596ed508480e v: v3 --- [refs] | 2 +- trunk/tools/perf/perf.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0ab895190418..7cdd157aa6a5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ad0cf3478de8677f720ee06393b3147819568d6a +refs/heads/master: c1e028ef40b8d6943b767028ba17d4f2ba020edb diff --git a/trunk/tools/perf/perf.h b/trunk/tools/perf/perf.h index ef7aa0a0c526..95aaf565c704 100644 --- a/trunk/tools/perf/perf.h +++ b/trunk/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