diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-08-10 13:51:12 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-12 19:22:04 +0100 |
commit | 16b42a139ccdfaa061646c7acc13aa2e071db909 (patch) | |
tree | eab94cf34211b6cf806f1a108951ff261c26382f /meta/recipes-kernel | |
parent | 0b85162b9c22f3d2783b7f39ab8357e6bcd1ad54 (diff) | |
download | poky-16b42a139ccdfaa061646c7acc13aa2e071db909.tar.gz |
lttng-modules: replace mips compaction fix with upstream change
lttng upstream had a different solution to the compaction build isses
seen on mips.
We switch our patch for a backport of the upstream solution.
(From OE-Core rev: 459f746a198a8ae7840d783f5824fc14a44a8488)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
3 files changed, 69 insertions, 104 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-compaction-make-tracepoints-condtional-on-CONFIG_COM.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-compaction-make-tracepoints-condtional-on-CONFIG_COM.patch deleted file mode 100644 index 305ca7cb8b..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/0001-compaction-make-tracepoints-condtional-on-CONFIG_COM.patch +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | From 417bb00022c813c6dc11bfa652d74f3687df7626 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Wed, 3 Aug 2022 14:55:56 -0400 | ||
4 | Subject: [PATCH] compaction: make tracepoints condtional on CONFIG_COMPACTION | ||
5 | |||
6 | When building against a v5.19 mips kernel, the following errors | ||
7 | were triggered: | ||
8 | |||
9 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:105:42: note: expected 'struct compact_control *' but argument is of type 'struct compact_control *' | ||
10 | | 105 | TP_PROTO(struct compact_control *cc, | ||
11 | | | ~~~~~~~~~~~~~~~~~~~~~~~~^~ | ||
12 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:779:68: note: in definition of macro 'LTTNG_TRACEPOINT_EVENT_CLASS_CODE' | ||
13 | | 779 | static inline size_t __event_get_align__##_name(void *__tp_locvar, _proto) \ | ||
14 | | | ^~~~~~ | ||
15 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:106:50: note: in expansion of macro 'PARAMS' | ||
16 | | 106 | LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, PARAMS(_proto), PARAMS(_args), , , \ | ||
17 | | | ^~~~~~ | ||
18 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:41:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_CLASS' | ||
19 | | 41 | LTTNG_TRACEPOINT_EVENT_CLASS(map, \ | ||
20 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
21 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:42:30: note: in expansion of macro 'PARAMS' | ||
22 | | 42 | PARAMS(proto), \ | ||
23 | | | ^~~~~~ | ||
24 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:101:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_MAP' | ||
25 | | 101 | LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, | ||
26 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
27 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:105:9: note: in expansion of macro 'TP_PROTO' | ||
28 | | 105 | TP_PROTO(struct compact_control *cc, | ||
29 | | | ^~~~~~~~ | ||
30 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:112:57: error: invalid use of undefined type 'struct compact_control' | ||
31 | |||
32 | ... | ||
33 | |||
34 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:108:25: warning: 'struct compact_control' declared inside parameter list will not be visible outside of this definition or declaration | ||
35 | | 108 | TP_PROTO(struct compact_control *cc, | ||
36 | | | ^~~~~~~~~~~~~~~ | ||
37 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:159:43: note: in definition of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP' | ||
38 | | 159 | void __event_template_proto___##_template(_proto); | ||
39 | | | ^~~~~~ | ||
40 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:45:61: note: in expansion of macro 'PARAMS' | ||
41 | | 45 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) | ||
42 | | | ^~~~~~ | ||
43 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:104:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_MAP' | ||
44 | | 104 | LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, | ||
45 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
46 | | lttng-modules-2.13.4/src/probes/../../include/instrumentation/events/compaction.h:108:9: note: in expansion of macro 'TP_PROTO' | ||
47 | | 108 | TP_PROTO(struct compact_control *cc, | ||
48 | | | ^~~~~~~~ | ||
49 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:159:6: error: conflicting types for '__event_template_proto___compaction_migratepages'; have 'void(struct compact_control *, unsigned int)' | ||
50 | | 159 | void __event_template_proto___##_template(_proto); | ||
51 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | ||
52 | | lttng-modules-2.13.4/src/probes/../../include/lttng/tracepoint-event-impl.h:45:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP' | ||
53 | | 45 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) | ||
54 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
55 | |||
56 | The root cause appears to be that this particular mips kernel does not | ||
57 | have CONFIG_COMPACTION avaiable, and hence we end up with the struct | ||
58 | declaration within this tracepoint, and then conflicting types. | ||
59 | |||
60 | While putting the conditional around only compaction_migratepages seemed | ||
61 | sufficient to get the build working, it doesn't look like any of the | ||
62 | tracepoints should be valid, so we extend it to all definitions. | ||
63 | |||
64 | Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2022-August/030246.html] | ||
65 | |||
66 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
67 | --- | ||
68 | include/instrumentation/events/compaction.h | 5 +++++ | ||
69 | 1 file changed, 5 insertions(+) | ||
70 | |||
71 | diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h | ||
72 | index ecae39a..155804a 100644 | ||
73 | --- a/include/instrumentation/events/compaction.h | ||
74 | +++ b/include/instrumentation/events/compaction.h | ||
75 | @@ -9,6 +9,8 @@ | ||
76 | #include <linux/types.h> | ||
77 | #include <lttng/kernel-version.h> | ||
78 | |||
79 | +#ifdef CONFIG_COMPACTION | ||
80 | + | ||
81 | #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) | ||
82 | |||
83 | LTTNG_TRACEPOINT_EVENT_CLASS(compaction_isolate_template, | ||
84 | @@ -97,6 +99,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template, | ||
85 | |||
86 | #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */ | ||
87 | |||
88 | + | ||
89 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0)) | ||
90 | LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, | ||
91 | |||
92 | @@ -182,6 +185,8 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, | ||
93 | ) | ||
94 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */ | ||
95 | |||
96 | +#endif /* CONFIG_COMPACTION */ | ||
97 | + | ||
98 | #endif /* LTTNG_TRACE_COMPACTION_H */ | ||
99 | |||
100 | /* This part must be outside protection */ | ||
101 | -- | ||
102 | 2.25.1 | ||
103 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-compaction.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-compaction.patch new file mode 100644 index 0000000000..21e27ffc5e --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-compaction.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 8e42c4821fb5f5cb816b6ddf73d9a13ba3298a63 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Jeanson <mjeanson@efficios.com> | ||
3 | Date: Wed, 10 Aug 2022 11:07:14 -0400 | ||
4 | Subject: [PATCH] fix: tie compaction probe build to CONFIG_COMPACTION | ||
5 | |||
6 | The definition of 'struct compact_control' in 'mm/internal.h' depends on | ||
7 | CONFIG_COMPACTION being defined. Only build the compaction probe when | ||
8 | this configuration option is enabled. | ||
9 | |||
10 | Thanks to Bruce Ashfield <bruce.ashfield@gmail.com> for reporting this | ||
11 | issue. | ||
12 | |||
13 | Upstream-Status: Backport [https://review.lttng.org/c/lttng-modules/+/8660] | ||
14 | |||
15 | Change-Id: I81e77aa9c1bf10452c152d432fe5224df0db42c9 | ||
16 | Signed-off-by: Michael Jeanson <mjeanson@efficios.com> | ||
17 | --- | ||
18 | src/probes/Kbuild | 34 ++++++++++++++++++---------------- | ||
19 | 1 file changed, 18 insertions(+), 16 deletions(-) | ||
20 | |||
21 | diff --git a/src/probes/Kbuild b/src/probes/Kbuild | ||
22 | index 2908cf75..3e556b8e 100644 | ||
23 | --- a/src/probes/Kbuild | ||
24 | +++ b/src/probes/Kbuild | ||
25 | @@ -167,22 +167,24 @@ ifneq ($(CONFIG_BTRFS_FS),) | ||
26 | endif # $(wildcard $(btrfs_dep)) | ||
27 | endif # CONFIG_BTRFS_FS | ||
28 | |||
29 | -# A dependency on internal header 'mm/internal.h' was introduced in v5.18 | ||
30 | -compaction_dep = $(srctree)/mm/internal.h | ||
31 | -compaction_dep_wildcard = $(wildcard $(compaction_dep)) | ||
32 | -compaction_dep_check = $(shell \ | ||
33 | -if [ \( $(VERSION) -ge 6 \ | ||
34 | - -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \ | ||
35 | - -z "$(compaction_dep_wildcard)" ] ; then \ | ||
36 | - echo "warn" ; \ | ||
37 | -else \ | ||
38 | - echo "ok" ; \ | ||
39 | -fi ;) | ||
40 | -ifeq ($(compaction_dep_check),ok) | ||
41 | - obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o | ||
42 | -else | ||
43 | - $(warning Files $(compaction_dep) not found. Probe "compaction" is disabled. Use full kernel source tree to enable it.) | ||
44 | -endif # $(wildcard $(compaction_dep)) | ||
45 | +ifneq ($(CONFIG_COMPACTION),) | ||
46 | + # A dependency on internal header 'mm/internal.h' was introduced in v5.18 | ||
47 | + compaction_dep = $(srctree)/mm/internal.h | ||
48 | + compaction_dep_wildcard = $(wildcard $(compaction_dep)) | ||
49 | + compaction_dep_check = $(shell \ | ||
50 | + if [ \( $(VERSION) -ge 6 \ | ||
51 | + -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \ | ||
52 | + -z "$(compaction_dep_wildcard)" ] ; then \ | ||
53 | + echo "warn" ; \ | ||
54 | + else \ | ||
55 | + echo "ok" ; \ | ||
56 | + fi ;) | ||
57 | + ifeq ($(compaction_dep_check),ok) | ||
58 | + obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o | ||
59 | + else | ||
60 | + $(warning Files $(compaction_dep) not found. Probe "compaction" is disabled. Use full kernel source tree to enable it.) | ||
61 | + endif # $(wildcard $(compaction_dep)) | ||
62 | +endif # CONFIG_COMPACTION | ||
63 | |||
64 | ifneq ($(CONFIG_EXT4_FS),) | ||
65 | ext4_dep = $(srctree)/fs/ext4/*.h | ||
66 | -- | ||
67 | 2.34.1 | ||
68 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.13.4.bb b/meta/recipes-kernel/lttng/lttng-modules_2.13.4.bb index a81a0e580f..f60ab3b5f5 100644 --- a/meta/recipes-kernel/lttng/lttng-modules_2.13.4.bb +++ b/meta/recipes-kernel/lttng/lttng-modules_2.13.4.bb | |||
@@ -15,7 +15,7 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ | |||
15 | file://0002-fix-fs-Remove-flags-parameter-from-aops-write_begin-.patch \ | 15 | file://0002-fix-fs-Remove-flags-parameter-from-aops-write_begin-.patch \ |
16 | file://0003-fix-workqueue-Fix-type-of-cpu-in-trace-event-v5.19.patch \ | 16 | file://0003-fix-workqueue-Fix-type-of-cpu-in-trace-event-v5.19.patch \ |
17 | file://0001-fix-net-skb-introduce-kfree_skb_reason-v5.15.58.v5.1.patch \ | 17 | file://0001-fix-net-skb-introduce-kfree_skb_reason-v5.15.58.v5.1.patch \ |
18 | file://0001-compaction-make-tracepoints-condtional-on-CONFIG_COM.patch \ | 18 | file://0001-fix-compaction.patch \ |
19 | " | 19 | " |
20 | 20 | ||
21 | # Use :append here so that the patch is applied also when using devupstream | 21 | # Use :append here so that the patch is applied also when using devupstream |