summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authortom.zanussi@linux.intel.com <tom.zanussi@linux.intel.com>2016-07-07 12:10:42 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-27 08:33:36 +0100
commit03d9d8e7d356dae222f33f2d3dafd1d7c60af93d (patch)
tree683a683facad4a365fd4a8c0c8491eb364f8f7fd /meta
parent229e3e4e5f52deaeb7cad28f27448da014460b30 (diff)
downloadpoky-03d9d8e7d356dae222f33f2d3dafd1d7c60af93d.tar.gz
systemtap: Add missing memory flag to fix stap module compilation
The 4.4 kernel removed some memory flag definitions, which cause module compilation errors, rendering sytemtap essentially useless in krogoth. The problem is fixed in systemtap 3.0 and therefore in master, but as mentioned in Systemtap BZ1285348, the fix for older versions is this patch. (From OE-Core rev: 7c27f257286dfca745a956bae15c1f4ed505343f) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch73
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc1
2 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch
new file mode 100644
index 0000000000..4c34d7762b
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch
@@ -0,0 +1,73 @@
1From 3d010295efd215cf83a7d07eecf89137973c154a Mon Sep 17 00:00:00 2001
2Message-Id: <3d010295efd215cf83a7d07eecf89137973c154a.1467836241.git.tom.zanussi@linux.intel.com>
3From: Jesper Brouer <jbrouer@redhat.com>
4Date: Mon, 30 Nov 2015 11:24:29 -0600
5Subject: [PATCH] Fix BZ1285348 by updating systemtap's memory flag usage.
6
7* runtime/linux/runtime_defines.h: Make sure __GFP_WAIT is defined.
8* runtime/stp_utrace.c (utrace_task_alloc): Change GFP_IOFS to
9 STP_ALLOC_FLAGS.
10 (utrace_attach_task): Ditto.
11
12Upstream-Status: Backport
13
14Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
15---
16 runtime/linux/runtime_defines.h | 23 +++++++++++++++++++++++
17 runtime/stp_utrace.c | 5 +++--
18 2 files changed, 26 insertions(+), 2 deletions(-)
19
20diff --git a/runtime/linux/runtime_defines.h b/runtime/linux/runtime_defines.h
21index e69de29..6b44e0d 100644
22--- a/runtime/linux/runtime_defines.h
23+++ b/runtime/linux/runtime_defines.h
24@@ -0,0 +1,23 @@
25+// The following kernel commit renamed __GFP_WAIT to __GRP_RECLAIM:
26+//
27+// commit 71baba4b92dc1fa1bc461742c6ab1942ec6034e9
28+// Author: Mel Gorman <mgorman@techsingularity.net>
29+// Date: Fri Nov 6 16:28:28 2015 -0800
30+//
31+// mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM
32+//
33+// __GFP_WAIT was used to signal that the caller was in atomic
34+// context and could not sleep. Now it is possible to
35+// distinguish between true atomic context and callers that are
36+// not willing to sleep. The latter should clear
37+// __GFP_DIRECT_RECLAIM so kswapd will still wake. As clearing
38+// __GFP_WAIT behaves differently, there is a risk that people
39+// will clear the wrong flags. This patch renames __GFP_WAIT to
40+// __GFP_RECLAIM to clearly indicate what it does -- setting it
41+// allows all reclaim activity, clearing them prevents it.
42+//
43+// Handle the rename by defining __GFP_WAIT as __GFP_RECLAIM.
44+#include <linux/gfp.h>
45+#ifndef __GFP_WAIT
46+#define __GFP_WAIT __GFP_RECLAIM
47+#endif
48diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c
49index c69dec1..a8afc0d 100644
50--- a/runtime/stp_utrace.c
51+++ b/runtime/stp_utrace.c
52@@ -511,7 +511,8 @@ static struct utrace *__task_utrace_struct(struct task_struct *task)
53 */
54 static bool utrace_task_alloc(struct task_struct *task)
55 {
56- struct utrace *utrace = kmem_cache_zalloc(utrace_cachep, GFP_IOFS);
57+ struct utrace *utrace = kmem_cache_zalloc(utrace_cachep,
58+ STP_ALLOC_FLAGS);
59 struct utrace *u;
60
61 if (unlikely(!utrace))
62@@ -782,7 +783,7 @@ static struct utrace_engine *utrace_attach_task(
63 utrace = task_utrace_struct(target);
64 }
65
66- engine = kmem_cache_alloc(utrace_engine_cachep, GFP_IOFS);
67+ engine = kmem_cache_alloc(utrace_engine_cachep, STP_ALLOC_FLAGS);
68 if (unlikely(!engine))
69 return ERR_PTR(-ENOMEM);
70
71--
722.5.0
73
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 656f15f808..2ea98b2a56 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -9,6 +9,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
9 file://system_map_location.patch \ 9 file://system_map_location.patch \
10 file://configure-allow-to-disable-libvirt.patch \ 10 file://configure-allow-to-disable-libvirt.patch \
11 file://x32_abi_time.patch \ 11 file://x32_abi_time.patch \
12 file://0001-Fix-BZ1285348-by-updating-systemtap-s-memory-flag-us.patch \
12 " 13 "
13 14
14# systemtap doesn't support mips 15# systemtap doesn't support mips