[Top] [All Lists]

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

To:, Ralf Baechle <>, David Daney <>,,, Ingo Molnar <>,
Subject: [PATCH v3 resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS
From: Deng-Cheng Zhu <>
Date: Mon, 11 Oct 2010 21:38:02 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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;
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 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!

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

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

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

Signed-off-by: Deng-Cheng Zhu<>

 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")

+#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")

<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 <=