* [PATCH] perf tools: fix build for various architectures
@ 2012-11-27 12:16 Mark Rutland
2012-11-27 13:41 ` Arnaldo Carvalho de Melo
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Mark Rutland @ 2012-11-27 12:16 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Mark Rutland, Arnaldo Carvalho de Melo,
David Howells, Deng-Cheng Zhu, Ingo Molnar, Kyle McMartin,
Martin Schwidefsky, Paul Mackerras, Peter Zijlstra, Tony Luck,
Will Deacon
The UAPI changes broke the perf tool, and as of 3.7-rc7, it
still won't build for arm:
In file included from util/../perf.h:81:0,
from util/cache.h:7,
from perf.c:12:
util/../../../arch/arm/include/asm/unistd.h:16:29: fatal error: uapi/asm/unistd.h: No such file or directory
compilation terminated.
make: *** [perf.o] Error 1
It seems the perf tool build infrastructure can't map <uapi/*> paths,
and several architectures (arm, arm64, ia64, mips, parisc, powerpc,
s390) include <uapi/asm/unistd.h> from their <asm/unistd.h>.
This patch copies 77626081: "perf tools: Fix build on sparc." in simply
changing the path to use arch/arm/include/uapi/asm/unistd.h directly for
all of these cases.
I've tested this on arm, but I don't have the necessary toolchains to
check the other cases.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Will Deacon <will.deacon@arm.com>
---
tools/perf/perf.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index c50985e..b42fd6a 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -26,14 +26,14 @@ 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"
#endif
#ifdef __s390__
-#include "../../arch/s390/include/asm/unistd.h"
+#include "../../arch/s390/include/uapi/asm/unistd.h"
#define rmb() asm volatile("bcr 15,0" ::: "memory")
#define cpu_relax() asm volatile("" ::: "memory");
#endif
@@ -50,7 +50,7 @@ void get_term_dimensions(struct winsize *ws);
#endif
#ifdef __hppa__
-#include "../../arch/parisc/include/asm/unistd.h"
+#include "../../arch/parisc/include/uapi/asm/unistd.h"
#define rmb() asm volatile("" ::: "memory")
#define cpu_relax() asm volatile("" ::: "memory");
#define CPUINFO_PROC "cpu"
@@ -71,14 +71,14 @@ void get_term_dimensions(struct winsize *ws);
#endif
#ifdef __ia64__
-#include "../../arch/ia64/include/asm/unistd.h"
+#include "../../arch/ia64/include/uapi/asm/unistd.h"
#define rmb() asm volatile ("mf" ::: "memory")
#define cpu_relax() asm volatile ("hint @pause" ::: "memory")
#define CPUINFO_PROC "model name"
#endif
#ifdef __arm__
-#include "../../arch/arm/include/asm/unistd.h"
+#include "../../arch/arm/include/uapi/asm/unistd.h"
/*
* Use the __kuser_memory_barrier helper in the CPU helper page. See
* arch/arm/kernel/entry-armv.S in the kernel source for details.
@@ -89,13 +89,13 @@ void get_term_dimensions(struct winsize *ws);
#endif
#ifdef __aarch64__
-#include "../../arch/arm64/include/asm/unistd.h"
+#include "../../arch/arm64/include/uapi/asm/unistd.h"
#define rmb() asm volatile("dmb ld" ::: "memory")
#define cpu_relax() asm volatile("yield" ::: "memory")
#endif
#ifdef __mips__
-#include "../../arch/mips/include/asm/unistd.h"
+#include "../../arch/mips/include/uapi/asm/unistd.h"
#define rmb() asm volatile( \
".set mips2\n\t" \
"sync\n\t" \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] perf tools: fix build for various architectures
2012-11-27 12:16 [PATCH] perf tools: fix build for various architectures Mark Rutland
@ 2012-11-27 13:41 ` Arnaldo Carvalho de Melo
2012-11-30 16:40 ` Mark Rutland
2012-11-27 14:12 ` Will Deacon
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-11-27 13:41 UTC (permalink / raw)
To: Mark Rutland
Cc: Ingo Molnar, linux-kernel, David Howells, Deng-Cheng Zhu,
Ingo Molnar, Kyle McMartin, Martin Schwidefsky, Paul Mackerras,
Peter Zijlstra, Tony Luck, Will Deacon
Em Tue, Nov 27, 2012 at 12:16:31PM +0000, Mark Rutland escreveu:
> The UAPI changes broke the perf tool, and as of 3.7-rc7, it
> still won't build for arm:
>
> util/../../../arch/arm/include/asm/unistd.h:16:29: fatal error: uapi/asm/unistd.h: No such file or directory
> compilation terminated.
> I've tested this on arm, but I don't have the necessary toolchains to
> check the other cases.
Can you try with my perf/urgent branch?
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/urgent
I tested it with raspbian on a raspberry pi system and also with a cross
compiler on a x86_64 workstation.
I already sent the pull request to Ingo, that should process it and push
to Linus soon.
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] perf tools: fix build for various architectures
2012-11-27 13:41 ` Arnaldo Carvalho de Melo
@ 2012-11-30 16:40 ` Mark Rutland
0 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2012-11-30 16:40 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ingo Molnar, linux-kernel@vger.kernel.org, David Howells,
Deng-Cheng Zhu, Ingo Molnar, Kyle McMartin, Martin Schwidefsky,
Paul Mackerras, Peter Zijlstra, Tony Luck, Will Deacon
On Tue, Nov 27, 2012 at 01:41:16PM +0000, Arnaldo Carvalho de Melo wrote:
> Em Tue, Nov 27, 2012 at 12:16:31PM +0000, Mark Rutland escreveu:
> > The UAPI changes broke the perf tool, and as of 3.7-rc7, it
> > still won't build for arm:
> >
> > util/../../../arch/arm/include/asm/unistd.h:16:29: fatal error: uapi/asm/unistd.h: No such file or directory
> > compilation terminated.
>
> > I've tested this on arm, but I don't have the necessary toolchains to
> > check the other cases.
>
> Can you try with my perf/urgent branch?
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/urgent
It builds and runs fine for me on my A9x4 coretile.
> I tested it with raspbian on a raspberry pi system and also with a cross
> compiler on a x86_64 workstation.
>
> I already sent the pull request to Ingo, that should process it and push
> to Linus soon.
Let's hope it gets merged before v3.7 is tagged.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: fix build for various architectures
2012-11-27 12:16 [PATCH] perf tools: fix build for various architectures Mark Rutland
2012-11-27 13:41 ` Arnaldo Carvalho de Melo
@ 2012-11-27 14:12 ` Will Deacon
2012-11-27 14:20 ` Kyle McMartin
2012-11-27 14:41 ` Josh Boyer
3 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2012-11-27 14:12 UTC (permalink / raw)
To: Mark Rutland
Cc: Ingo Molnar, linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo, David Howells, Deng-Cheng Zhu,
Ingo Molnar, Kyle McMartin, Martin Schwidefsky, Paul Mackerras,
Peter Zijlstra, Tony Luck
On Tue, Nov 27, 2012 at 12:16:31PM +0000, Mark Rutland wrote:
> The UAPI changes broke the perf tool, and as of 3.7-rc7, it
> still won't build for arm:
>
> In file included from util/../perf.h:81:0,
> from util/cache.h:7,
> from perf.c:12:
> util/../../../arch/arm/include/asm/unistd.h:16:29: fatal error: uapi/asm/unistd.h: No such file or directory
> compilation terminated.
> make: *** [perf.o] Error 1
>
> It seems the perf tool build infrastructure can't map <uapi/*> paths,
> and several architectures (arm, arm64, ia64, mips, parisc, powerpc,
> s390) include <uapi/asm/unistd.h> from their <asm/unistd.h>.
>
> This patch copies 77626081: "perf tools: Fix build on sparc." in simply
> changing the path to use arch/arm/include/uapi/asm/unistd.h directly for
> all of these cases.
>
> I've tested this on arm, but I don't have the necessary toolchains to
> check the other cases.
For the arm/arm64 parts:
Acked-by: Will Deacon <will.deacon@arm.com>
Cheers,
Will
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: fix build for various architectures
2012-11-27 12:16 [PATCH] perf tools: fix build for various architectures Mark Rutland
2012-11-27 13:41 ` Arnaldo Carvalho de Melo
2012-11-27 14:12 ` Will Deacon
@ 2012-11-27 14:20 ` Kyle McMartin
2012-11-27 14:41 ` Josh Boyer
3 siblings, 0 replies; 6+ messages in thread
From: Kyle McMartin @ 2012-11-27 14:20 UTC (permalink / raw)
To: Mark Rutland
Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo,
David Howells, Deng-Cheng Zhu, Ingo Molnar, Martin Schwidefsky,
Paul Mackerras, Peter Zijlstra, Tony Luck, Will Deacon
On Tue, Nov 27, 2012 at 12:16:31PM +0000, Mark Rutland wrote:
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Kyle McMartin <kyle@mcmartin.ca>
Looks obviously right.
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Will Deacon <will.deacon@arm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf tools: fix build for various architectures
2012-11-27 12:16 [PATCH] perf tools: fix build for various architectures Mark Rutland
` (2 preceding siblings ...)
2012-11-27 14:20 ` Kyle McMartin
@ 2012-11-27 14:41 ` Josh Boyer
3 siblings, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2012-11-27 14:41 UTC (permalink / raw)
To: Mark Rutland
Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo,
David Howells, Deng-Cheng Zhu, Ingo Molnar, Kyle McMartin,
Martin Schwidefsky, Paul Mackerras, Peter Zijlstra, Tony Luck,
Will Deacon
On Tue, Nov 27, 2012 at 7:16 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> The UAPI changes broke the perf tool, and as of 3.7-rc7, it
> still won't build for arm:
>
> In file included from util/../perf.h:81:0,
> from util/cache.h:7,
> from perf.c:12:
> util/../../../arch/arm/include/asm/unistd.h:16:29: fatal error: uapi/asm/unistd.h: No such file or directory
> compilation terminated.
> make: *** [perf.o] Error 1
>
> It seems the perf tool build infrastructure can't map <uapi/*> paths,
> and several architectures (arm, arm64, ia64, mips, parisc, powerpc,
> s390) include <uapi/asm/unistd.h> from their <asm/unistd.h>.
>
> This patch copies 77626081: "perf tools: Fix build on sparc." in simply
> changing the path to use arch/arm/include/uapi/asm/unistd.h directly for
> all of these cases.
>
> I've tested this on arm, but I don't have the necessary toolchains to
> check the other cases.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Kyle McMartin <kyle@mcmartin.ca>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> tools/perf/perf.h | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
This is correct, but it shouldn't be needed. Arnaldo has a pull request
out to Ingo that should fix the build issues on all architectures in a
more generic way. See:
http://article.gmane.org/gmane.linux.kernel.cross-arch/15974
I'm really hoping that gets into Linus' tree ASAP or 3.7 will ship with
a broken perf on non-x86.
josh
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-30 16:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 12:16 [PATCH] perf tools: fix build for various architectures Mark Rutland
2012-11-27 13:41 ` Arnaldo Carvalho de Melo
2012-11-30 16:40 ` Mark Rutland
2012-11-27 14:12 ` Will Deacon
2012-11-27 14:20 ` Kyle McMartin
2012-11-27 14:41 ` Josh Boyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox