Patchwork [31/32] perf powerpc: Use uapi/unistd.h to fix build error

login
register
mail settings
Submitter Arnaldo Carvalho de Melo
Date Nov. 18, 2012, 2:29 p.m.
Message ID <1353248997-30763-32-git-send-email-acme@infradead.org>
Download mbox | patch
Permalink /patch/199911/
State Not Applicable
Headers show

Comments

Arnaldo Carvalho de Melo - Nov. 18, 2012, 2:29 p.m.
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>

Use the 'unistd.h' from arch/powerpc/include/uapi to build the perf tool.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: linuxppc-dev@ozlabs.org
Link: http://lkml.kernel.org/r/20121107191818.GA16211@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/perf.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Josh Boyer - Nov. 19, 2012, 1:29 p.m.
On Sun, Nov 18, 2012 at 9:29 AM, Arnaldo Carvalho de Melo
<acme@infradead.org> wrote:
> From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
>
> Use the 'unistd.h' from arch/powerpc/include/uapi to build the perf tool.

This would work for powerpc, but at least s390x and ARM have the same
build issue.  Why would we fix this piecemeal per-arch?

David Howells has a patch that _should_ fix it for all of them at once.
Is there a reason that isn't going in?

josh
Arnaldo Carvalho de Melo - Nov. 19, 2012, 3:07 p.m.
Em Mon, Nov 19, 2012 at 08:29:09AM -0500, Josh Boyer escreveu:
> On Sun, Nov 18, 2012 at 9:29 AM, Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>

> > Use the 'unistd.h' from arch/powerpc/include/uapi to build the perf tool.
> 
> This would work for powerpc, but at least s390x and ARM have the same
> build issue.  Why would we fix this piecemeal per-arch?
> 
> David Howells has a patch that _should_ fix it for all of them at once.
> Is there a reason that isn't going in?

David rebased his patch on top of my perf/core branch, I just tested it
and all works as expected, so I'd say he should push that branch
upstream as I can't just cherry pick some csets, it needs a merge that
involves more than just tools/perf AFAIK.

- Arnaldo
Josh Boyer - Nov. 19, 2012, 3:18 p.m.
On Mon, Nov 19, 2012 at 10:07 AM, Arnaldo Carvalho de Melo
<acme@ghostprotocols.net> wrote:
> Em Mon, Nov 19, 2012 at 08:29:09AM -0500, Josh Boyer escreveu:
>> On Sun, Nov 18, 2012 at 9:29 AM, Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
>> > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
>
>> > Use the 'unistd.h' from arch/powerpc/include/uapi to build the perf tool.
>>
>> This would work for powerpc, but at least s390x and ARM have the same
>> build issue.  Why would we fix this piecemeal per-arch?
>>
>> David Howells has a patch that _should_ fix it for all of them at once.
>> Is there a reason that isn't going in?
>
> David rebased his patch on top of my perf/core branch, I just tested it
> and all works as expected, so I'd say he should push that branch
> upstream as I can't just cherry pick some csets, it needs a merge that
> involves more than just tools/perf AFAIK.

OK...  is perf/core (all 32 commits) headed into 3.7?  Because the perf
build is broken in 3.7-rcX, and we're at the point where Linus gets kind
of picky about what he accepts.  So we'd need your branch and David's to
fix compile issues.  And then we'd need Xiao Guangrong's fixes for 'perf
kvm' to only build on x86.  That's quite a number of fixes we need just
to get perf to compile.  Is someone other than me keeping track of
that?

I would just like people to stop wondering when perf builds on non-x86
architectures will work.

josh

Patch

diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 0047264..f53ee0b 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -26,7 +26,7 @@  void get_term_dimensions(struct winsize *ws);
 #endif
 
 #ifdef __powerpc__
-#include "../../arch/powerpc/include/asm/unistd.h"
+#include "../../arch/powerpc/include/uapi/asm/unistd.h"
 #define rmb()		asm volatile ("sync" ::: "memory")
 #define cpu_relax()	asm volatile ("" ::: "memory");
 #define CPUINFO_PROC	"cpu"