xref: /freebsd/sys/contrib/openzfs/config/kernel-flush_dcache_page.m4 (revision 19fae0f66023a97a9b464b3beeeabb2081f575b3)
1dnl #
2dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
3dnl # function and may indirectly referencing GPL-only cpu_feature_keys on
4dnl # powerpc
5dnl #
6
7dnl #
8dnl # Checking if flush_dcache_page is exported GPL-only
9dnl #
10AC_DEFUN([ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE], [
11	ZFS_LINUX_TEST_SRC([flush_dcache_page], [
12		#include <asm/cacheflush.h>
13	], [
14		flush_dcache_page(0);
15	], [], [ZFS_META_LICENSE])
16])
17AC_DEFUN([ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE], [
18	AC_MSG_CHECKING([whether flush_dcache_page() is GPL-only])
19	ZFS_LINUX_TEST_RESULT([flush_dcache_page_license], [
20		AC_MSG_RESULT(no)
21	], [
22		AC_MSG_RESULT(yes)
23		AC_DEFINE(HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY, 1,
24		    [flush_dcache_page() is GPL-only])
25	])
26])
27