blob: 48d7e2f00ca02ed8002947783e78dfefd7a9f4cd [file] [log] [blame]
Andrew Geissler1e34c2d2020-05-29 16:02:59 -05001From 23cfd7b53ec1521d3c23ceddfda49352c2d349dc Mon Sep 17 00:00:00 2001
2From: Ovidiu Panait <ovidiu.panait@windriver.com>
3Date: Thu, 14 May 2020 13:05:24 +0300
4Subject: [PATCH 3/4] Fix: Use vmalloc_sync_mappings on kernel 5.6 as well
5
6Upstream commit [1], that got rid of vmalloc_sync_all and introduced
7vmalloc_sync_mappings, is a v5.6 commit:
8$ git tag --contains 763802b53a427ed3cbd419dbba255c414fdd9e7c
9v5.6
10v5.6-rc7
11v5.7-rc1
12v5.7-rc2
13v5.7-rc3
14
15Extend the LINUX_VERSION_CODE check to v5.6 to fix the following warnings:
16...
17[ 483.242037] LTTng: vmalloc_sync_all symbol lookup failed.
18[ 483.257056] Page fault handler and NMI tracing might trigger faults.
19...
20
21[1] https://github.com/torvalds/linux/commit/763802b53a427ed3cbd419dbba255c414fdd9e7c
22
23Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/da356b324dfc160e09b8966b691792037badf455]
24
25Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
26Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
27Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
28---
29 wrapper/vmalloc.h | 12 ++++++------
30 1 file changed, 6 insertions(+), 6 deletions(-)
31
32diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
33index 5d0b389..d905f60 100644
34--- a/wrapper/vmalloc.h
35+++ b/wrapper/vmalloc.h
36@@ -21,7 +21,7 @@
37 #include <linux/kallsyms.h>
38 #include <wrapper/kallsyms.h>
39
40-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
41+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
42
43 static inline
44 void wrapper_vmalloc_sync_mappings(void)
45@@ -43,7 +43,7 @@ void wrapper_vmalloc_sync_mappings(void)
46 }
47 }
48
49-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
50+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
51
52 /*
53 * Map vmalloc_sync_mappings to vmalloc_sync_all() on kernels before 5.7.
54@@ -68,11 +68,11 @@ void wrapper_vmalloc_sync_mappings(void)
55 }
56 }
57
58-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
59+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
60
61 #else
62
63-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
64+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
65
66 static inline
67 void wrapper_vmalloc_sync_mappings(void)
68@@ -80,7 +80,7 @@ void wrapper_vmalloc_sync_mappings(void)
69 return vmalloc_sync_mappings();
70 }
71
72-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
73+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
74
75 static inline
76 void wrapper_vmalloc_sync_mappings(void)
77@@ -88,7 +88,7 @@ void wrapper_vmalloc_sync_mappings(void)
78 return vmalloc_sync_all();
79 }
80
81-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
82+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
83
84 #endif
85
86--
872.17.1
88