linux-mips
[Top] [All Lists]

[PATCH v3] Perf-tool/MIPS: support cross compiling of tools/perf for MIP

To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, David Daney <ddaney@caviumnetworks.com>, a.p.zijlstra@chello.nl, paulus@samba.org, mingo@elte.hu, acme@redhat.com
Subject: [PATCH v3] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS
From: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Date: Mon, 11 Oct 2010 20:18:42 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=hJQhuma3Z4blc0NYJiMKyzCBUFSQ121svj5cD7FyLBI=; b=CWwbMgqnegBkgL+sT0s6cR4/ssAhEVpteOKWdwnVpSZMo7n6pa5pdyjIsSJ9+8vdll Ks26d52XQvQhp7CuJ+Ng7LravfEVFDFUdcwaCJOZFLnUGL1adad4epvBEPi22Lfg4ZaF yp35IEdHaND4whcUSHeZieJlMIqD4xLjGTYkg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=YuwXdjJCtYmQRdJHNSJSR9FbzJECHflJNp4+C6ba+oWcJzdNp5clYTMYYYoxwQ2LsP ouJXNDTo9T4V+WzCcm4XRNWpUCxFx20y/Du7OLvtYSc67HxAP26VPjBb1JiJhottaOwb WKYp+XkkEgh45AicHv+uY+1F3+3y2fIEkhfW8=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

This version fixed the cosmetic issue pointed out by Ralf. If it looks ok,

Ralf, please help Ack it.


Thanks,


Deng-Cheng


Signed-off-by: Deng-Cheng Zhu<dengcheng.zhu@gmail.com>

---
 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 6fb379b..cd05284 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -73,6 +73,18 @@
 #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>


<Prev in Thread] Current Thread [Next in Thread>