forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <behlendorf1@llnl.gov> Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com> Co-authored-by: Michael Niewöhner <foss@mniewoehner.de> Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Closes openzfs#10422 (cherry picked from commit 080102a) - apply to 0.8.4 before certain files were moved around - config/kernel-kmem.m4 exists in git but not release tarballs because it is unused; introduce it in a new file to prevent conflicts - linux/mm.h is included in git master via sys/kmem.h; do not remove it here or the build will error due to undefined is_vmalloc_addr() Original-patch-by: Michael Niewöhner <c0d3z3r0@users.noreply.github.com> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
- Loading branch information
1 parent
18a115b
commit 89990ee
Showing
5 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters