Upstream commit [1], that got rid of vmalloc_sync_all and introduced
vmalloc_sync_mappings, is a v5.6 commit:
$ git tag --contains
763802b53a427ed3cbd419dbba255c414fdd9e7c
v5.6
v5.6-rc7
v5.7-rc1
v5.7-rc2
v5.7-rc3
Extend the LINUX_VERSION_CODE check to v5.6 to fix the following warnings:
...
[ 483.242037] LTTng: vmalloc_sync_all symbol lookup failed.
[ 483.257056] Page fault handler and NMI tracing might trigger faults.
...
[1] https://github.com/torvalds/linux/commit/
763802b53a427ed3cbd419dbba255c414fdd9e7c
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#include <linux/kallsyms.h>
#include <wrapper/kallsyms.h>
#include <linux/kallsyms.h>
#include <wrapper/kallsyms.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
static inline
void wrapper_vmalloc_sync_mappings(void)
static inline
void wrapper_vmalloc_sync_mappings(void)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
/*
* Map vmalloc_sync_mappings to vmalloc_sync_all() on kernels before 5.7.
/*
* Map vmalloc_sync_mappings to vmalloc_sync_all() on kernels before 5.7.
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
static inline
void wrapper_vmalloc_sync_mappings(void)
static inline
void wrapper_vmalloc_sync_mappings(void)
return vmalloc_sync_mappings();
}
return vmalloc_sync_mappings();
}
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
static inline
void wrapper_vmalloc_sync_mappings(void)
static inline
void wrapper_vmalloc_sync_mappings(void)
return vmalloc_sync_all();
}
return vmalloc_sync_all();
}
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */