| To: | Deng-Cheng Zhu <dengcheng.zhu@gmail.com> |
|---|---|
| Subject: | Re: [PATCH resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Sat, 9 Oct 2010 06:39:04 +0100 |
| 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 |
| In-reply-to: | <4CA69ECC.1070409@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <4CA4920C.30401@gmail.com> <4CA6566D.2050003@caviumnetworks.com> <20101002015947.GB9360@linux-mips.org> <4CA69ECC.1070409@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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 in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 0/3] usb: Add OCTEON II USB support., Greg KH |
|---|---|
| Next by Date: | Re: [PATCH 1/8] MIPS: Octeon: Set dma_masks for octeon_mgmt device., Ralf Baechle |
| Previous by Thread: | Re: [PATCH resend] Perf-tool/MIPS: support cross compiling of tools/perf for MIPS, Deng-Cheng Zhu |
| Next by Thread: | Re: [PATCH] jump label: Add MIPS support., Steven Rostedt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |