ZAP: Add by_dnode variants to lookup/prefetch_uint64
[zfs.git] / config / kernel-flush_dcache_page.m4
blobaa916c87d53170c7cfab51943a5d1bb1d8f8e810
1 dnl #
2 dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
3 dnl # function and may indirectly referencing GPL-only symbols:
4 dnl # on powerpc: cpu_feature_keys
5 dnl # on riscv: PageHuge (added from 6.2)
6 dnl #
8 dnl #
9 dnl # Checking if flush_dcache_page is exported GPL-only
10 dnl #
11 AC_DEFUN([ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE], [
12         ZFS_LINUX_TEST_SRC([flush_dcache_page], [
13                 #include <asm/cacheflush.h>
14         ], [
15                 flush_dcache_page(0);
16         ], [], [ZFS_META_LICENSE])
18 AC_DEFUN([ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE], [
19         AC_MSG_CHECKING([whether flush_dcache_page() is GPL-only])
20         ZFS_LINUX_TEST_RESULT([flush_dcache_page_license], [
21                 AC_MSG_RESULT(no)
22         ], [
23                 AC_MSG_RESULT(yes)
24                 AC_DEFINE(HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY, 1,
25                     [flush_dcache_page() is GPL-only])
26         ])