summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-06-20 06:10:28 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2018-06-20 23:30:06 (GMT)
commit55894192dbf4278ccb3bc25e059d6f62fbb8003f (patch)
tree590f0aac347cd78114e13cdc61595551735d4973 /recipes-kernel
parent58089c38234f36aaa40eb421d121630147ac1796 (diff)
downloadmeta-intel-55894192dbf4278ccb3bc25e059d6f62fbb8003f.tar.gz
lttng-modules: fix build error with 4.14 -rt kernel
Backport patch to fix build errors with 4.14 rt kernels. Should be reverted after lttng-modules is upgraded to 2.10.6 in OE-core. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch87
-rw-r--r--recipes-kernel/lttng/lttng-modules_%.bbappend5
2 files changed, 91 insertions, 1 deletions
diff --git a/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch b/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch
new file mode 100644
index 0000000..9fc4247
--- /dev/null
+++ b/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch
@@ -0,0 +1,87 @@
1From 5a32ce54ebf73b297a0bbccfe88c36994e15dcc4 Mon Sep 17 00:00:00 2001
2From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3Date: Mon, 12 Feb 2018 18:31:40 +0100
4Subject: [PATCH] Fix: update timer instrumentation on 4.16 and 4.14-rt
5
6See upstream commit :
7
8 commit 63e2ed3659752a4850e0ef3a07f809988fcd74a4
9 Author: Anna-Maria Gleixner <anna-maria@linutronix.de>
10 Date: Thu Dec 21 11:41:38 2017 +0100
11
12 tracing/hrtimer: Print the hrtimer mode in the 'hrtimer_start' tracepoint
13
14 The 'hrtimer_start' tracepoint lacks the mode information. The mode is
15 important because consecutive starts can switch from ABS to REL or from
16 PINNED to non PINNED.
17
18 Append the mode field.
19
20See linux-rt commit :
21
22 commit 6ee32a49b1ed61c08ac9f1c9fcbf83d3c749b71d
23 Author: Anna-Maria Gleixner <anna-maria@linutronix.de>
24 Date: Sun Oct 22 23:39:46 2017 +0200
25
26 tracing: hrtimer: Print hrtimer mode in hrtimer_start tracepoint
27
28 The hrtimer_start tracepoint lacks the mode information. The mode is
29 important because consecutive starts can switch from ABS to REL or from
30 PINNED to non PINNED.
31
32 Add the mode information.
33
34Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
35Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
36Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
37
38Upstream-Status: Backport [http://git.lttng.org/?p=lttng-modules.git;a=commit;h=5a32ce54ebf73b297a0bbccfe88c36994e15dcc4]
39Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
40
41---
42 instrumentation/events/lttng-module/timer.h | 22 +++++++++++++++++++++
43 1 file changed, 22 insertions(+)
44
45diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h
46index d62fd25..6f0cb7f 100644
47--- a/instrumentation/events/lttng-module/timer.h
48+++ b/instrumentation/events/lttng-module/timer.h
49@@ -160,6 +160,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_init,
50 * hrtimer_start - called when the hrtimer is started
51 * @timer: pointer to struct hrtimer
52 */
53+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0) || \
54+ LTTNG_RT_KERNEL_RANGE(4,14,0,0, 4,15,0,0))
55+LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
56+
57+ timer_hrtimer_start,
58+
59+ TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode),
60+
61+ TP_ARGS(hrtimer, mode),
62+
63+ TP_FIELDS(
64+ ctf_integer_hex(void *, hrtimer, hrtimer)
65+ ctf_integer_hex(void *, function, hrtimer->function)
66+ ctf_integer(s64, expires,
67+ lttng_ktime_get_tv64(hrtimer_get_expires(hrtimer)))
68+ ctf_integer(s64, softexpires,
69+ lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer)))
70+ ctf_integer(enum hrtimer_mode, mode, mode)
71+ )
72+)
73+#else
74 LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
75
76 timer_hrtimer_start,
77@@ -177,6 +198,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
78 lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer)))
79 )
80 )
81+#endif
82
83 /**
84 * htimmer_expire_entry - called immediately before the hrtimer callback
85--
862.17.1
87
diff --git a/recipes-kernel/lttng/lttng-modules_%.bbappend b/recipes-kernel/lttng/lttng-modules_%.bbappend
index dc1c4a7..5dfaf79 100644
--- a/recipes-kernel/lttng/lttng-modules_%.bbappend
+++ b/recipes-kernel/lttng/lttng-modules_%.bbappend
@@ -3,5 +3,8 @@ FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
3 3
4LTTNG_PATCH = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel','linux-intel linux-intel-rt','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}" 4LTTNG_PATCH = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel','linux-intel linux-intel-rt','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}"
5 5
6SRC_URI_append_intel-x86-common = " ${LTTNG_PATCH}" 6SRC_URI_append_intel-x86-common = " \
7 ${LTTNG_PATCH} \
8 file://0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch \
9 "
7 10