From d2f8a57a30066815aba9cd4ebef7bf9edf21bcaa Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 26 Jun 2022 00:39:36 +0200 Subject: lttng-modules: Backport Linux 5.18+, 5.15.44+, 5.10.119+ fixes The Linux kernel commit 14c174633f349 ("random: remove unused tracepoints") removed unused tracepoints and has been backported to stable Linux kernel releases. This causes build failure of lttng-modules: " lttng-modules-2.11.6/probes/lttng-probe-random.c:18:10: fatal error: trace/events/random.h: No such file or directory | 18 | #include | | ^~~~~~~~~~~~~~~~~~~~~~~ | compilation terminated. " Backport patches from lttng-modules master branch to address the build failure on all of Linux 5.18.y, 5.15.y 5.10.y, 5.4, 4.19, 4.14, and 4.9 kernel versions. (From OE-Core rev: 9f301f5563df868626d624c2d0781dae1b81a4c0) Signed-off-by: Marek Vasut Cc: Bruce Ashfield Cc: Steve Sakoman Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- ...dom-tracepoints-removed-in-stable-kernels.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch (limited to 'meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch') diff --git a/meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch b/meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch new file mode 100644 index 0000000000..73ba4d06bc --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch @@ -0,0 +1,51 @@ +From 2c98e0cd03eba0aa935796bc7413c51b5e4b055c Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Tue, 31 May 2022 15:24:48 -0400 +Subject: [PATCH 19/19] fix: 'random' tracepoints removed in stable kernels + +The upstream commit 14c174633f349cb41ea90c2c0aaddac157012f74 removing +the 'random' tracepoints is being backported to multiple stable kernel +branches, I don't see how that qualifies as a fix but here we are. + +Use the presence of 'include/trace/events/random.h' in the kernel source +tree instead of the rather tortuous version check to determine if we +need to build 'lttng-probe-random.ko'. + +Upstream-Status: Backport [ed1149ef88fb62c365ac66cf62c58ac6abd8d7e8] +Change-Id: I8f5f2f4c9e09c61127c49c7949b22dd3fab0460d +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + probes/Kbuild | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +diff --git a/probes/Kbuild b/probes/Kbuild +index 87f2d681..f09d6b65 100644 +--- a/probes/Kbuild ++++ b/probes/Kbuild +@@ -216,18 +216,10 @@ ifneq ($(CONFIG_FRAME_WARN),0) + endif + + # Introduced in v3.6, remove in v5.18 +-obj-$(CONFIG_LTTNG) += $(shell \ +- if [ \( ! \( $(VERSION) -ge 6 \ +- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \ +- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 15 -a $(SUBLEVEL) -ge 44 \) \ +- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 10 -a $(SUBLEVEL) -ge 119\) \) \) \ +- -a \ +- $(VERSION) -ge 4 \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \ +- echo "lttng-probe-random.o" ; fi;) ++random_dep = $(srctree)/include/trace/events/random.h ++ifneq ($(wildcard $(random_dep)),) ++ obj-$(CONFIG_LTTNG) += lttng-probe-random.o ++endif + + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ +-- +2.35.1 + -- cgit v1.2.3-54-g00ecf