linux-mips
[Top] [All Lists]

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

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, Ingo Molnar <mingo@elte.hu>, acme@redhat.com
Subject: [PATCH v3 resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS
From: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Date: Mon, 11 Oct 2010 21:38:02 +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=Fr5NO7bFFUOGrDzneQjfDtieKeDAVT5xqxkdnoSGsLM=; b=QqUrcnOqEmBONpxKpHRTYf3aNhGoCdoAPL3xxPQFQ9uZM0UNxRU+wdOb+i9fdzZG/H ozS1X1hLXyY2x2W9S116g6dgPo+NloWpQufV2UlnutTckJXZigDymrVhBMRAOTed1aFF dypTjYCW8rqysT6FmBWPnUl5cpIqGb4zKVrmw=
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=WI0DIE5tjH+flQaAM4y/x0VoxBo+qnB/9JSE+WOCgJKM8aUf9Rg679l7lCGnYa+u6d 1zjzlh9IRPRfLjve4QEnQIo4OwHU/LjwPNdbzNzAx9uYwIT/pogfQc7GudbGLPqVlCRz YB+9XNnB8GaWJQI7LOvn5JnWLE1cnoxImYRtM=
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

(Resending this version of patch to append the changelogs.)

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

Ralf, please help Ack it. Thanks!


Changes
--------
v3 - v2:
o Fix the cosmetic issue of redundant dot-ops

v2 - v1:
o Change rmb() to use SYNC

v1:
o Include mips unistd.h and define rmb()/cpu_relax() in tools/perf/perf.h

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>
  • [PATCH v3 resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS, Deng-Cheng Zhu <=