From: Ralf Baechle <ralf@linux-mips.org>
To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: David Daney <ddaney@caviumnetworks.com>,
linux-mips@linux-mips.org, a.p.zijlstra@chello.nl,
paulus@samba.org, mingo@elte.hu, acme@redhat.com
Subject: Re: [PATCH resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS
Date: Sat, 9 Oct 2010 06:39:04 +0100 [thread overview]
Message-ID: <20101009053903.GA19625@linux-mips.org> (raw)
In-Reply-To: <4CA69ECC.1070409@gmail.com>
On Sat, Oct 02, 2010 at 10:54:04AM +0800, Deng-Cheng Zhu wrote:
> Thanks guys. So let's turn the patch into the following?
>
> Signed-off-by: Deng-Cheng Zhu<dengcheng.zhu@gmail.com>
> ---
> tools/perf/perf.h | 14 ++++++++++++++
> 1 files changed, 14 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,20 @@
> #define cpu_relax() asm volatile("":::"memory")
> #endif
>
> +#ifdef __mips__
> +#include "../../arch/mips/include/asm/unistd.h"
> +#define rmb() asm volatile( \
> + ".set push\n\t" \
> + ".set noreorder\n\t" \
> + ".set mips2\n\t" \
> + "sync\n\t" \
> + ".set pop" \
> + : /* no output */ \
> + : /* no input */ \
> + : "memory")
> +#define cpu_relax() asm volatile("" ::: "memory")
> +#endif
Yes, aside of cosmetic issues this is looking good. The cosmetic issue
is that there are lots of useless dot-ops in the inline assembler. That
could be reduced to just .set mips2 before the SYNC and .set mips0 after.
There are some considerations wrt. to the MT ASE so I've bounced a few
emails around in the meantime but that's nothing that should stop merging
this patch with the rest of the perf patches.
Ralf
prev parent reply other threads:[~2010-10-09 5:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 13:35 [PATCH resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS Deng-Cheng Zhu
2010-10-01 21:45 ` David Daney
2010-10-02 1:59 ` Ralf Baechle
2010-10-02 2:54 ` Deng-Cheng Zhu
2010-10-09 5:39 ` Ralf Baechle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101009053903.GA19625@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=ddaney@caviumnetworks.com \
--cc=dengcheng.zhu@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.