[meta-intel] [PATCH 2/3] lttng-modules: Fix issue related to -rt kernel

Saul Wold sgw at linux.intel.com
Thu Oct 26 13:28:41 PDT 2017


The -rt kernel requires that lttng has a patch
This issue has been fixed upstream

[YOCTO #12278] - This is pyro only

Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
 ...tprio-tracing-function-failed-to-compile-.patch | 55 ++++++++++++++++++++++
 .../recipes-kernel/lttng/lttng-modules_%.bbappend  |  4 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 common/recipes-kernel/lttng/lttng-modules/0002-sched_pi_setprio-tracing-function-failed-to-compile-.patch

diff --git a/common/recipes-kernel/lttng/lttng-modules/0002-sched_pi_setprio-tracing-function-failed-to-compile-.patch b/common/recipes-kernel/lttng/lttng-modules/0002-sched_pi_setprio-tracing-function-failed-to-compile-.patch
new file mode 100644
index 0000000..c58a59c
--- /dev/null
+++ b/common/recipes-kernel/lttng/lttng-modules/0002-sched_pi_setprio-tracing-function-failed-to-compile-.patch
@@ -0,0 +1,55 @@
+From 97c079142cc7386e32d34a129c2734ab05ea2f09 Mon Sep 17 00:00:00 2001
+From: Priyalee Kushwaha <priyalee.kushwaha at intel.com>
+Date: Wed, 7 Jun 2017 09:39:59 -0700
+Subject: [PATCH] sched_pi_setprio : tracing function failed to compile with RT
+ patches
+
+sched_pi_setprio tracing function shows compilation failure with
+4.9.30 kernel with RT patches. one of RT patch redefines
+sched_pi_setprio in kernel.
+
+Upstream-Status: Backport
+
+Signed-off-by: Dwane Pottratz <dwane.pottratz at intel.com>
+Signed-off-by: Kushwaha, Priyalee <priyalee.kushwaha at intel.com>
+Signed-off-by: Weight, Russell H <russell.h.weight at intel.com>
+---
+ instrumentation/events/lttng-module/sched.h | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h
+index 0738ff0..8d117c6 100644
+--- a/instrumentation/events/lttng-module/sched.h
++++ b/instrumentation/events/lttng-module/sched.h
+@@ -545,6 +545,20 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
+  * Tracepoint for showing priority inheritance modifying a tasks
+  * priority.
+  */
++#ifdef CONFIG_PREEMPT_RT_BASE
++LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
++
++	TP_PROTO(struct task_struct *tsk,  struct task_struct *pi_task),
++
++	TP_ARGS(tsk, pi_task),
++	TP_FIELDS(
++		ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN)
++		ctf_integer(pid_t, tid, tsk->pid)
++		ctf_integer(int, oldprio, tsk->prio - MAX_RT_PRIO)
++		ctf_integer(int, newprio, pi_task ? pi_task->prio : tsk->prio)
++	)
++)
++#else
+ LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
+ 
+ 	TP_PROTO(struct task_struct *tsk, int newprio),
+@@ -559,6 +573,7 @@ LTTNG_TRACEPOINT_EVENT(sched_pi_setprio,
+ 	)
+ )
+ #endif
++#endif
+ 
+ #endif /* LTTNG_TRACE_SCHED_H */
+ 
+-- 
+2.10.0
+
diff --git a/common/recipes-kernel/lttng/lttng-modules_%.bbappend b/common/recipes-kernel/lttng/lttng-modules_%.bbappend
index b65d0db..328cf0a 100644
--- a/common/recipes-kernel/lttng/lttng-modules_%.bbappend
+++ b/common/recipes-kernel/lttng/lttng-modules_%.bbappend
@@ -3,5 +3,7 @@ FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
 
 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)}"
 
-SRC_URI += "${LTTNG_PATCH}"
+LTTNG_PATCH += "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel','linux-intel-rt','file://0002-sched_pi_setprio-tracing-function-failed-to-compile-.patch','',d)}"
+
+SRC_URI_append = " ${LTTNG_PATCH}"
 
-- 
2.11.0



More information about the meta-intel mailing list