summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-kernel/linux
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2022-12-04 15:09:32 -0600
committerRyan Eatmon <reatmon@ti.com>2022-12-04 15:09:32 -0600
commitf20ceaa7fb2699824b72e52893788d9722633b09 (patch)
treec87d95b7945dedeef61ebd7d6810d1acb175ba77 /meta-ti-bsp/recipes-kernel/linux
parent0f39cef2284dc3e1d9a64dec4a1037d1aff617d2 (diff)
downloadmeta-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.patch109
-rw-r--r--meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-systest-5.10/init_disassemble_info-signature-changes-causes-compile-failures.patch109
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
75index 308189454788..6573d2b07548 100644 75index 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--
1082.17.1 1082.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
2Adaption of a patch [A] applied to meta-arm for the kernel. But since TI has it's own
3kernel 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
7Signed-off-by: Ryan Eatmon <reatmon@ti.com>
8
9
10
11From 1b2013986271de39360cf79e62ed9b7d2cc59f9b Mon Sep 17 00:00:00 2001
12From: Andres Freund <andres@anarazel.de>
13Date: Wed, 22 Jun 2022 11:19:18 -0700
14Subject: [PATCH] init_disassemble_info() signature changes causes compile
15 failures
16MIME-Version: 1.0
17Content-Type: text/plain; charset=UTF-8
18Content-Transfer-Encoding: 8bit
19
20Hi,
21
22binutils changed the signature of init_disassemble_info(), which now causes
23perf and bpftool to fail to compile (e.g. on debian unstable).
24
25Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac
26
27util/annotate.c: In function ?symbol__disassemble_bpf?:
28util/annotate.c:1765:9: error: too few arguments to function ?init_disassemble_info?
29 1765 | init_disassemble_info(&info, s,
30 | ^~~~~~~~~~~~~~~~~~~~~
31In 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
36with equivalent failures in
37
38tools/bpf/bpf_jit_disasm.c
39tools/bpf/bpftool/jit_disasm.c
40
41The fix is easy enough, add a wrapper around fprintf() that conforms to the
42new signature.
43
44However I assume the necessary feature test and wrapper should only be added
45once? I don't know the kernel stuff well enough to choose the right structure
46here.
47
48Attached is my local fix for perf. Obviously would need work to be a real
49solution.
50
51Greetings,
52
53Andres Freund
54---
55
56binutils 2.39 changed the signature of init_disassemble_info(),
57which now causes perf and bpftool to fail to compile.
58
59Relevant binutils commit: [1]
60
61There is a proper fix in development upstream[2].
62This 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
67Upstream-Status: Pending
68Signed-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
74diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
75index 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--
1082.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
2Adaption of a patch [A] applied to meta-arm for the kernel. But since TI has it's own
3kernel 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
7Signed-off-by: Ryan Eatmon <reatmon@ti.com>
8
9
10
11From 1b2013986271de39360cf79e62ed9b7d2cc59f9b Mon Sep 17 00:00:00 2001
12From: Andres Freund <andres@anarazel.de>
13Date: Wed, 22 Jun 2022 11:19:18 -0700
14Subject: [PATCH] init_disassemble_info() signature changes causes compile
15 failures
16MIME-Version: 1.0
17Content-Type: text/plain; charset=UTF-8
18Content-Transfer-Encoding: 8bit
19
20Hi,
21
22binutils changed the signature of init_disassemble_info(), which now causes
23perf and bpftool to fail to compile (e.g. on debian unstable).
24
25Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac
26
27util/annotate.c: In function ?symbol__disassemble_bpf?:
28util/annotate.c:1765:9: error: too few arguments to function ?init_disassemble_info?
29 1765 | init_disassemble_info(&info, s,
30 | ^~~~~~~~~~~~~~~~~~~~~
31In 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
36with equivalent failures in
37
38tools/bpf/bpf_jit_disasm.c
39tools/bpf/bpftool/jit_disasm.c
40
41The fix is easy enough, add a wrapper around fprintf() that conforms to the
42new signature.
43
44However I assume the necessary feature test and wrapper should only be added
45once? I don't know the kernel stuff well enough to choose the right structure
46here.
47
48Attached is my local fix for perf. Obviously would need work to be a real
49solution.
50
51Greetings,
52
53Andres Freund
54---
55
56binutils 2.39 changed the signature of init_disassemble_info(),
57which now causes perf and bpftool to fail to compile.
58
59Relevant binutils commit: [1]
60
61There is a proper fix in development upstream[2].
62This 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
67Upstream-Status: Pending
68Signed-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
74diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
75index 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--
1082.17.1
109