diff options
Diffstat (limited to 'meta-linaro/recipes-kernel/perf')
3 files changed, 108 insertions, 0 deletions
diff --git a/meta-linaro/recipes-kernel/perf/files/0001-perf-tools-Fix-arm64-build-error.patch b/meta-linaro/recipes-kernel/perf/files/0001-perf-tools-Fix-arm64-build-error.patch new file mode 100644 index 0000000..4a4da97 --- /dev/null +++ b/meta-linaro/recipes-kernel/perf/files/0001-perf-tools-Fix-arm64-build-error.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 7d885749b6de2c9a1168d566e2380207b9177108 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Salter <msalter@redhat.com> | ||
3 | Date: Fri, 25 Jul 2014 18:02:46 -0400 | ||
4 | Subject: [PATCH] perf tools: Fix arm64 build error | ||
5 | |||
6 | I'm seeing the following build error on arm64: | ||
7 | |||
8 | In file included from util/event.c:3:0: | ||
9 | util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function) | ||
10 | u64 cache_regs[PERF_REGS_MAX]; | ||
11 | ^ | ||
12 | |||
13 | This patch adds a PERF_REGS_MAX definition for arm64. | ||
14 | |||
15 | Signed-off-by: Mark Salter <msalter@redhat.com> | ||
16 | Acked-by: Jean Pihet <jean.pihet@linaro.org> | ||
17 | Cc: Ingo Molnar <mingo@redhat.com> | ||
18 | Cc: Jean Pihet <jean.pihet@linaro.org> | ||
19 | Cc: Paul Mackerras <paulus@samba.org> | ||
20 | Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> | ||
21 | Link: http://lkml.kernel.org/r/1406325766-8085-1-git-send-email-msalter@redhat.com | ||
22 | Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ||
23 | --- | ||
24 | tools/perf/arch/arm64/include/perf_regs.h | 2 ++ | ||
25 | 1 file changed, 2 insertions(+) | ||
26 | |||
27 | diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h | ||
28 | index e9441b9..1d3f39c 100644 | ||
29 | --- a/tools/perf/arch/arm64/include/perf_regs.h | ||
30 | +++ b/tools/perf/arch/arm64/include/perf_regs.h | ||
31 | @@ -6,6 +6,8 @@ | ||
32 | #include <asm/perf_regs.h> | ||
33 | |||
34 | #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1) | ||
35 | +#define PERF_REGS_MAX PERF_REG_ARM64_MAX | ||
36 | + | ||
37 | #define PERF_REG_IP PERF_REG_ARM64_PC | ||
38 | #define PERF_REG_SP PERF_REG_ARM64_SP | ||
39 | |||
40 | -- | ||
41 | 2.1.3 | ||
42 | |||
diff --git a/meta-linaro/recipes-kernel/perf/files/0001-perf-tools-Fix-build-breakage-on-arm64-targets.patch b/meta-linaro/recipes-kernel/perf/files/0001-perf-tools-Fix-build-breakage-on-arm64-targets.patch new file mode 100644 index 0000000..cb03946 --- /dev/null +++ b/meta-linaro/recipes-kernel/perf/files/0001-perf-tools-Fix-build-breakage-on-arm64-targets.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 660d13296bbbe79635d1d9d700080b88061faffb Mon Sep 17 00:00:00 2001 | ||
2 | From: Will Deacon <will.deacon@arm.com> | ||
3 | Date: Tue, 30 Sep 2014 12:27:12 +0100 | ||
4 | Subject: [PATCH] perf tools: Fix build breakage on arm64 targets | ||
5 | |||
6 | Attempting to build the perf tool for an arm64 target results in the | ||
7 | following failure: | ||
8 | |||
9 | arch/arm64/util/unwind-libunwind.c: In function 'libunwind__arch_reg_id': | ||
10 | arch/arm64/util/unwind-libunwind.c:77:3: error: implicit declaration of function 'pr_err' | ||
11 | pr_err("unwind: invalid reg id %d\n", regnum); | ||
12 | ^ | ||
13 | arch/arm64/util/unwind-libunwind.c:77:3: error: nested extern declaration of 'pr_err' | ||
14 | |||
15 | This is due to commit 84f5d36f4866 ("perf tools: Move pr_* debug macros | ||
16 | into debug object") moving the pr_* macros into a new header file, but | ||
17 | failing to update architectures other than x86. | ||
18 | |||
19 | This patch adds the missing include, and fixes the build again. | ||
20 | |||
21 | Signed-off-by: Will Deacon <will.deacon@arm.com> | ||
22 | Cc: Jean Pihet <jean.pihet@linaro.org> | ||
23 | Cc: Jiri Olsa <jolsa@kernel.org> | ||
24 | Cc: linux-arm-kernel@lists.infradead.org | ||
25 | Link: http://lkml.kernel.org/r/1412076432-22045-1-git-send-email-will.deacon@arm.com | ||
26 | Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ||
27 | --- | ||
28 | tools/perf/arch/arm64/util/unwind-libunwind.c | 1 + | ||
29 | 1 file changed, 1 insertion(+) | ||
30 | |||
31 | diff --git a/tools/perf/arch/arm64/util/unwind-libunwind.c b/tools/perf/arch/arm64/util/unwind-libunwind.c | ||
32 | index 436ee43..a87afa9 100644 | ||
33 | --- a/tools/perf/arch/arm64/util/unwind-libunwind.c | ||
34 | +++ b/tools/perf/arch/arm64/util/unwind-libunwind.c | ||
35 | @@ -3,6 +3,7 @@ | ||
36 | #include <libunwind.h> | ||
37 | #include "perf_regs.h" | ||
38 | #include "../../util/unwind.h" | ||
39 | +#include "../../util/debug.h" | ||
40 | |||
41 | int libunwind__arch_reg_id(int regnum) | ||
42 | { | ||
43 | -- | ||
44 | 2.1.3 | ||
45 | |||
diff --git a/meta-linaro/recipes-kernel/perf/perf.bbappend b/meta-linaro/recipes-kernel/perf/perf.bbappend new file mode 100644 index 0000000..075e673 --- /dev/null +++ b/meta-linaro/recipes-kernel/perf/perf.bbappend | |||
@@ -0,0 +1,21 @@ | |||
1 | LICENSE = "GPL-2" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
3 | |||
4 | PV = "3.17" | ||
5 | |||
6 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
7 | SRC_URI = "${DEBIAN_MIRROR}/main/l/linux-tools/linux-tools_3.17.orig.tar.xz \ | ||
8 | file://0001-perf-tools-Fix-arm64-build-error.patch \ | ||
9 | file://0001-perf-tools-Fix-build-breakage-on-arm64-targets.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI[md5sum] = "6c78f25c86761a60b89235e12bc109a8" | ||
13 | SRC_URI[sha256sum] = "51162320841053fcf06070b6d5a6d984fb4c429e3ba3dc6d4eec021d374b926f" | ||
14 | |||
15 | S = "${WORKDIR}/linux-tools-${PV}" | ||
16 | B = "${WORKDIR}/linux-tools-${PV}" | ||
17 | |||
18 | do_compile_prepend() { | ||
19 | mkdir -p ${S}/include/generated | ||
20 | echo "#define UTS_RELEASE \"${PV}\"" > ${S}/include/generated/utsrelease.h | ||
21 | } | ||