projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad0cf34
)
perf, MIPS: Support cross compiling of tools/perf for MIPS
author
Deng-Cheng Zhu
<
[email protected]
>
Tue, 12 Oct 2010 11:33:33 +0000
(19:33 +0800)
committer
Ingo Molnar
<
[email protected]
>
Tue, 12 Oct 2010 11:34:37 +0000
(13:34 +0200)
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 <
[email protected]
>
Acked-by: Ralf Baechle <
[email protected]
>
Cc: David Daney <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
Cc: Paul Mackerras <
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
tools/perf/perf.h
patch
|
blob
|
history
diff --git
a/tools/perf/perf.h
b/tools/perf/perf.h
index ef7aa0a0c5265191e8120e76f9f134b5e241fa53..95aaf565c704fb6ea67cee78d49e177f0ba8f595 100644
(file)
--- 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>