xref: /freebsd/sys/contrib/openzfs/config/kernel-kmap-local-page.m4 (revision 75e1fea68aaa613a20dfdcd0c59dd403aca02c49)
1dnl #
2dnl # 5.11 API change
3dnl # kmap_atomic() was deprecated in favor of kmap_local_page()
4dnl #
5AC_DEFUN([ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE], [
6	ZFS_LINUX_TEST_SRC([kmap_local_page], [
7		#include <linux/highmem.h>
8	],[
9		struct page page;
10		kmap_local_page(&page);
11	])
12])
13
14AC_DEFUN([ZFS_AC_KERNEL_KMAP_LOCAL_PAGE], [
15	AC_MSG_CHECKING([whether kmap_local_page exists])
16	ZFS_LINUX_TEST_RESULT([kmap_local_page], [
17		AC_MSG_RESULT(yes)
18		AC_DEFINE(HAVE_KMAP_LOCAL_PAGE, 1,
19		    [kernel has kmap_local_page])
20	],[
21		AC_MSG_RESULT(no)
22	])
23])
24