diff options
author | Michael Niewöhner <[email protected]> | 2020-06-09 01:32:02 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-08 16:32:02 -0700 |
commit | 080102a1b686a36adaec3a11a9778783462429e8 (patch) | |
tree | 5a814ba5c2bc9477d5efaed519198144a2ab8da1 /config/kernel-kmem.m4 | |
parent | 529246df96e2838b18592ed18628d2a122828be8 (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 'config/kernel-kmem.m4')
-rw-r--r-- | config/kernel-kmem.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/config/kernel-kmem.m4 b/config/kernel-kmem.m4 index 286229916..43f9e72f8 100644 --- a/config/kernel-kmem.m4 +++ b/config/kernel-kmem.m4 @@ -80,3 +80,29 @@ AC_DEFUN([ZFS_AC_KERNEL_KVMALLOC], [ AC_MSG_RESULT(no) ]) ]) + +dnl # +dnl # 5.8 API, +dnl # __vmalloc PAGE_KERNEL removal +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL], [ + ZFS_LINUX_TEST_SRC([__vmalloc], [ + #include <linux/mm.h> + #include <linux/vmalloc.h> + ],[ + void *p __attribute__ ((unused)); + + p = __vmalloc(0, GFP_KERNEL, PAGE_KERNEL); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL], [ + AC_MSG_CHECKING([whether __vmalloc(ptr, flags, pageflags) is available]) + ZFS_LINUX_TEST_RESULT([__vmalloc], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VMALLOC_PAGE_KERNEL, 1, [__vmalloc page flags exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) +-
\ No newline at end of file |