summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Niewöhner <[email protected]>2020-06-09 01:32:02 +0200
committerGitHub <[email protected]>2020-06-08 16:32:02 -0700
commit080102a1b686a36adaec3a11a9778783462429e8 (patch)
tree5a814ba5c2bc9477d5efaed519198144a2ab8da1 /include
parent529246df96e2838b18592ed18628d2a122828be8 (diff)
Linux 5.8 compat: __vmalloc()
The `pgprot` argument has been removed from `__vmalloc` in Linux 5.8, being `PAGE_KERNEL` always now [1]. Detect this during configure and define a wrapper for older kernels. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/mm/vmalloc.c?h=next-20200605&id=88dca4ca5a93d2c09e5bbc6a62fbfc3af83c4fca Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Sebastian Gottschall <[email protected]> Co-authored-by: Michael Niewöhner <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]> Closes #10422
Diffstat (limited to 'include')
-rw-r--r--include/os/linux/spl/sys/kmem.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/os/linux/spl/sys/kmem.h b/include/os/linux/spl/sys/kmem.h
index 1f51f5d98..176858dc2 100644
--- a/include/os/linux/spl/sys/kmem.h
+++ b/include/os/linux/spl/sys/kmem.h
@@ -173,6 +173,15 @@ extern void *spl_kmem_zalloc(size_t sz, int fl, const char *func, int line);
extern void spl_kmem_free(const void *ptr, size_t sz);
/*
+ * 5.8 API change, pgprot_t argument removed.
+ */
+#ifdef HAVE_VMALLOC_PAGE_KERNEL
+#define spl_vmalloc(size, flags) __vmalloc(size, flags, PAGE_KERNEL)
+#else
+#define spl_vmalloc(size, flags) __vmalloc(size, flags)
+#endif
+
+/*
* The following functions are only available for internal use.
*/
extern void *spl_kmem_alloc_impl(size_t size, int flags, int node);