diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2018-06-20 14:10:28 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2018-07-22 13:04:34 +0800 |
commit | 631043a1f31cb728ce4dae25aea0ecddbab87573 (patch) | |
tree | 2a85daeb16bda6a797f45ed9fc0130045525f1f7 /common/recipes-kernel/lttng | |
parent | 9148b49e95ac24c1c457e0872f146d58f1007aa6 (diff) | |
download | meta-intel-631043a1f31cb728ce4dae25aea0ecddbab87573.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>
(cherry picked from commit 66047e49db3788a63fcd8df82a522a792bede523)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'common/recipes-kernel/lttng')
-rw-r--r-- | common/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch | 87 | ||||
-rw-r--r-- | common/recipes-kernel/lttng/lttng-modules_%.bbappend | 5 |
2 files changed, 91 insertions, 1 deletions
diff --git a/common/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch b/common/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch new file mode 100644 index 00000000..9fc4247c --- /dev/null +++ b/common/recipes-kernel/lttng/lttng-modules/0001-Fix-update-timer-instrumentation-on-4.16-and-4.14-rt.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From 5a32ce54ebf73b297a0bbccfe88c36994e15dcc4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rasmus Villemoes <rasmus.villemoes@prevas.dk> | ||
3 | Date: Mon, 12 Feb 2018 18:31:40 +0100 | ||
4 | Subject: [PATCH] Fix: update timer instrumentation on 4.16 and 4.14-rt | ||
5 | |||
6 | See 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 | |||
20 | See 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 | |||
34 | Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> | ||
35 | Signed-off-by: Michael Jeanson <mjeanson@efficios.com> | ||
36 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
37 | |||
38 | Upstream-Status: Backport [http://git.lttng.org/?p=lttng-modules.git;a=commit;h=5a32ce54ebf73b297a0bbccfe88c36994e15dcc4] | ||
39 | Signed-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 | |||
45 | diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h | ||
46 | index 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 | -- | ||
86 | 2.17.1 | ||
87 | |||
diff --git a/common/recipes-kernel/lttng/lttng-modules_%.bbappend b/common/recipes-kernel/lttng/lttng-modules_%.bbappend index dc1c4a74..5dfaf796 100644 --- a/common/recipes-kernel/lttng/lttng-modules_%.bbappend +++ b/common/recipes-kernel/lttng/lttng-modules_%.bbappend | |||
@@ -3,5 +3,8 @@ FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | |||
3 | 3 | ||
4 | LTTNG_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)}" | 4 | LTTNG_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 | ||
6 | SRC_URI_append_intel-x86-common = " ${LTTNG_PATCH}" | 6 | SRC_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 | ||