diff options
author | Ryan Eatmon <reatmon@ti.com> | 2022-12-04 15:09:32 -0600 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2022-12-04 15:09:32 -0600 |
commit | f20ceaa7fb2699824b72e52893788d9722633b09 (patch) | |
tree | c87d95b7945dedeef61ebd7d6810d1acb175ba77 /meta-ti-bsp/recipes-kernel/linux | |
parent | 0f39cef2284dc3e1d9a64dec4a1037d1aff617d2 (diff) | |
download | meta-ti-f20ceaa7fb2699824b72e52893788d9722633b09.tar.gz |
linux-ti-staging: Clean up init_disassemble_info() patch
There were fuzz errors with the patch that needed to be cleaned up,
and for some reason a v2 that was supposed to move the duplicate
patches in files/ was not pushed properly before merging.
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-kernel/linux')
-rw-r--r-- | meta-ti-bsp/recipes-kernel/linux/files/init_disassemble_info-signature-changes-causes-compile-failures.patch (renamed from meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch) | 8 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch | 109 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch | 109 |
3 files changed, 4 insertions, 222 deletions
diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch b/meta-ti-bsp/recipes-kernel/linux/files/init_disassemble_info-signature-changes-causes-compile-failures.patch index a8054125..33dee03a 100644 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch +++ b/meta-ti-bsp/recipes-kernel/linux/files/init_disassemble_info-signature-changes-causes-compile-failures.patch | |||
@@ -75,7 +75,7 @@ diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c | |||
75 | index 308189454788..6573d2b07548 100644 | 75 | index 308189454788..6573d2b07548 100644 |
76 | --- a/tools/perf/util/annotate.c | 76 | --- a/tools/perf/util/annotate.c |
77 | +++ b/tools/perf/util/annotate.c | 77 | +++ b/tools/perf/util/annotate.c |
78 | @@ -1685,6 +1685,18 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil | 78 | @@ -1685,6 +1685,18 @@ |
79 | #include <bfd.h> | 79 | #include <bfd.h> |
80 | #include <dis-asm.h> | 80 | #include <dis-asm.h> |
81 | 81 | ||
@@ -92,7 +92,7 @@ index 308189454788..6573d2b07548 100644 | |||
92 | +} | 92 | +} |
93 | + | 93 | + |
94 | static int symbol__disassemble_bpf(struct symbol *sym, | 94 | static int symbol__disassemble_bpf(struct symbol *sym, |
95 | struct annotate_args *args) | 95 | struct annotate_args *args) |
96 | { | 96 | { |
97 | @@ -1727,7 +1739,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, | 97 | @@ -1727,7 +1739,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, |
98 | goto out; | 98 | goto out; |
@@ -102,8 +102,8 @@ index 308189454788..6573d2b07548 100644 | |||
102 | + (fprintf_ftype) fprintf, | 102 | + (fprintf_ftype) fprintf, |
103 | + fprintf_styled); | 103 | + fprintf_styled); |
104 | 104 | ||
105 | info.arch = bfd_get_arch(bfdf); | 105 | info.arch = bfd_get_arch(bfdf); |
106 | info.mach = bfd_get_mach(bfdf); | 106 | info.mach = bfd_get_mach(bfdf); |
107 | -- | 107 | -- |
108 | 2.17.1 | 108 | 2.17.1 |
109 | 109 | ||
diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch deleted file mode 100644 index a8054125..00000000 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | |||
2 | Adaption of a patch [A] applied to meta-arm for the kernel. But since TI has it's own | ||
3 | kernel we have to "adjust" the patch to match our files. | ||
4 | |||
5 | [A] https://patchwork.yoctoproject.org/project/arm/patch/20220824025819.4888-1-jon.mason@arm.com/#5104 | ||
6 | |||
7 | Signed-off-by: Ryan Eatmon <reatmon@ti.com> | ||
8 | |||
9 | |||
10 | |||
11 | From 1b2013986271de39360cf79e62ed9b7d2cc59f9b Mon Sep 17 00:00:00 2001 | ||
12 | From: Andres Freund <andres@anarazel.de> | ||
13 | Date: Wed, 22 Jun 2022 11:19:18 -0700 | ||
14 | Subject: [PATCH] init_disassemble_info() signature changes causes compile | ||
15 | failures | ||
16 | MIME-Version: 1.0 | ||
17 | Content-Type: text/plain; charset=UTF-8 | ||
18 | Content-Transfer-Encoding: 8bit | ||
19 | |||
20 | Hi, | ||
21 | |||
22 | binutils changed the signature of init_disassemble_info(), which now causes | ||
23 | perf and bpftool to fail to compile (e.g. on debian unstable). | ||
24 | |||
25 | Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac | ||
26 | |||
27 | util/annotate.c: In function ?symbol__disassemble_bpf?: | ||
28 | util/annotate.c:1765:9: error: too few arguments to function ?init_disassemble_info? | ||
29 | 1765 | init_disassemble_info(&info, s, | ||
30 | | ^~~~~~~~~~~~~~~~~~~~~ | ||
31 | In file included from util/annotate.c:1718: | ||
32 | /usr/include/dis-asm.h:472:13: note: declared here | ||
33 | 472 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, | ||
34 | | ^~~~~~~~~~~~~~~~~~~~~ | ||
35 | |||
36 | with equivalent failures in | ||
37 | |||
38 | tools/bpf/bpf_jit_disasm.c | ||
39 | tools/bpf/bpftool/jit_disasm.c | ||
40 | |||
41 | The fix is easy enough, add a wrapper around fprintf() that conforms to the | ||
42 | new signature. | ||
43 | |||
44 | However I assume the necessary feature test and wrapper should only be added | ||
45 | once? I don't know the kernel stuff well enough to choose the right structure | ||
46 | here. | ||
47 | |||
48 | Attached is my local fix for perf. Obviously would need work to be a real | ||
49 | solution. | ||
50 | |||
51 | Greetings, | ||
52 | |||
53 | Andres Freund | ||
54 | --- | ||
55 | |||
56 | binutils 2.39 changed the signature of init_disassemble_info(), | ||
57 | which now causes perf and bpftool to fail to compile. | ||
58 | |||
59 | Relevant binutils commit: [1] | ||
60 | |||
61 | There is a proper fix in development upstream[2]. | ||
62 | This is a work-around for older kernels. | ||
63 | |||
64 | [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac | ||
65 | [2] https://patchwork.kernel.org/project/netdevbpf/cover/20220801013834.156015-1-andres@anarazel.de/ | ||
66 | |||
67 | Upstream-Status: Pending | ||
68 | Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> | ||
69 | |||
70 | |||
71 | tools/perf/util/annotate.c | 15 ++++++++++++++- | ||
72 | 1 file changed, 14 insertions(+), 1 deletion(-) | ||
73 | |||
74 | diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c | ||
75 | index 308189454788..6573d2b07548 100644 | ||
76 | --- a/tools/perf/util/annotate.c | ||
77 | +++ b/tools/perf/util/annotate.c | ||
78 | @@ -1685,6 +1685,18 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil | ||
79 | #include <bfd.h> | ||
80 | #include <dis-asm.h> | ||
81 | |||
82 | +static int fprintf_styled(void *, enum disassembler_style, const char* fmt, ...) | ||
83 | +{ | ||
84 | + va_list args; | ||
85 | + int r; | ||
86 | + | ||
87 | + va_start(args, fmt); | ||
88 | + r = vprintf(fmt, args); | ||
89 | + va_end(args); | ||
90 | + | ||
91 | + return r; | ||
92 | +} | ||
93 | + | ||
94 | static int symbol__disassemble_bpf(struct symbol *sym, | ||
95 | struct annotate_args *args) | ||
96 | { | ||
97 | @@ -1727,7 +1739,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, | ||
98 | goto out; | ||
99 | } | ||
100 | init_disassemble_info(&info, s, | ||
101 | - (fprintf_ftype) fprintf); | ||
102 | + (fprintf_ftype) fprintf, | ||
103 | + fprintf_styled); | ||
104 | |||
105 | info.arch = bfd_get_arch(bfdf); | ||
106 | info.mach = bfd_get_mach(bfdf); | ||
107 | -- | ||
108 | 2.17.1 | ||
109 | |||
diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch deleted file mode 100644 index a8054125..00000000 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | |||
2 | Adaption of a patch [A] applied to meta-arm for the kernel. But since TI has it's own | ||
3 | kernel we have to "adjust" the patch to match our files. | ||
4 | |||
5 | [A] https://patchwork.yoctoproject.org/project/arm/patch/20220824025819.4888-1-jon.mason@arm.com/#5104 | ||
6 | |||
7 | Signed-off-by: Ryan Eatmon <reatmon@ti.com> | ||
8 | |||
9 | |||
10 | |||
11 | From 1b2013986271de39360cf79e62ed9b7d2cc59f9b Mon Sep 17 00:00:00 2001 | ||
12 | From: Andres Freund <andres@anarazel.de> | ||
13 | Date: Wed, 22 Jun 2022 11:19:18 -0700 | ||
14 | Subject: [PATCH] init_disassemble_info() signature changes causes compile | ||
15 | failures | ||
16 | MIME-Version: 1.0 | ||
17 | Content-Type: text/plain; charset=UTF-8 | ||
18 | Content-Transfer-Encoding: 8bit | ||
19 | |||
20 | Hi, | ||
21 | |||
22 | binutils changed the signature of init_disassemble_info(), which now causes | ||
23 | perf and bpftool to fail to compile (e.g. on debian unstable). | ||
24 | |||
25 | Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac | ||
26 | |||
27 | util/annotate.c: In function ?symbol__disassemble_bpf?: | ||
28 | util/annotate.c:1765:9: error: too few arguments to function ?init_disassemble_info? | ||
29 | 1765 | init_disassemble_info(&info, s, | ||
30 | | ^~~~~~~~~~~~~~~~~~~~~ | ||
31 | In file included from util/annotate.c:1718: | ||
32 | /usr/include/dis-asm.h:472:13: note: declared here | ||
33 | 472 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, | ||
34 | | ^~~~~~~~~~~~~~~~~~~~~ | ||
35 | |||
36 | with equivalent failures in | ||
37 | |||
38 | tools/bpf/bpf_jit_disasm.c | ||
39 | tools/bpf/bpftool/jit_disasm.c | ||
40 | |||
41 | The fix is easy enough, add a wrapper around fprintf() that conforms to the | ||
42 | new signature. | ||
43 | |||
44 | However I assume the necessary feature test and wrapper should only be added | ||
45 | once? I don't know the kernel stuff well enough to choose the right structure | ||
46 | here. | ||
47 | |||
48 | Attached is my local fix for perf. Obviously would need work to be a real | ||
49 | solution. | ||
50 | |||
51 | Greetings, | ||
52 | |||
53 | Andres Freund | ||
54 | --- | ||
55 | |||
56 | binutils 2.39 changed the signature of init_disassemble_info(), | ||
57 | which now causes perf and bpftool to fail to compile. | ||
58 | |||
59 | Relevant binutils commit: [1] | ||
60 | |||
61 | There is a proper fix in development upstream[2]. | ||
62 | This is a work-around for older kernels. | ||
63 | |||
64 | [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac | ||
65 | [2] https://patchwork.kernel.org/project/netdevbpf/cover/20220801013834.156015-1-andres@anarazel.de/ | ||
66 | |||
67 | Upstream-Status: Pending | ||
68 | Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> | ||
69 | |||
70 | |||
71 | tools/perf/util/annotate.c | 15 ++++++++++++++- | ||
72 | 1 file changed, 14 insertions(+), 1 deletion(-) | ||
73 | |||
74 | diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c | ||
75 | index 308189454788..6573d2b07548 100644 | ||
76 | --- a/tools/perf/util/annotate.c | ||
77 | +++ b/tools/perf/util/annotate.c | ||
78 | @@ -1685,6 +1685,18 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil | ||
79 | #include <bfd.h> | ||
80 | #include <dis-asm.h> | ||
81 | |||
82 | +static int fprintf_styled(void *, enum disassembler_style, const char* fmt, ...) | ||
83 | +{ | ||
84 | + va_list args; | ||
85 | + int r; | ||
86 | + | ||
87 | + va_start(args, fmt); | ||
88 | + r = vprintf(fmt, args); | ||
89 | + va_end(args); | ||
90 | + | ||
91 | + return r; | ||
92 | +} | ||
93 | + | ||
94 | static int symbol__disassemble_bpf(struct symbol *sym, | ||
95 | struct annotate_args *args) | ||
96 | { | ||
97 | @@ -1727,7 +1739,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, | ||
98 | goto out; | ||
99 | } | ||
100 | init_disassemble_info(&info, s, | ||
101 | - (fprintf_ftype) fprintf); | ||
102 | + (fprintf_ftype) fprintf, | ||
103 | + fprintf_styled); | ||
104 | |||
105 | info.arch = bfd_get_arch(bfdf); | ||
106 | info.mach = bfd_get_mach(bfdf); | ||
107 | -- | ||
108 | 2.17.1 | ||
109 | |||