xref: /freebsd/sys/contrib/openzfs/config/kernel-zero_page.m4 (revision d9a42747950146bf03cda7f6e25d219253f8a57a)
1dnl #
2dnl # ZERO_PAGE() is an alias for emtpy_zero_page. On certain architectures
3dnl # this is a GPL exported variable.
4dnl #
5
6dnl #
7dnl # Checking if ZERO_PAGE is exported GPL-only
8dnl #
9AC_DEFUN([ZFS_AC_KERNEL_SRC_ZERO_PAGE], [
10	ZFS_LINUX_TEST_SRC([zero_page], [
11		#include <asm/pgtable.h>
12	], [
13		struct page *p __attribute__ ((unused));
14		p = ZERO_PAGE(0);
15	], [], [ZFS_META_LICENSE])
16])
17
18AC_DEFUN([ZFS_AC_KERNEL_ZERO_PAGE], [
19	AC_MSG_CHECKING([whether ZERO_PAGE() is GPL-only])
20	ZFS_LINUX_TEST_RESULT([zero_page_license], [
21		AC_MSG_RESULT(no)
22	], [
23		AC_MSG_RESULT(yes)
24		AC_DEFINE(HAVE_ZERO_PAGE_GPL_ONLY, 1,
25		    [ZERO_PAGE() is GPL-only])
26	])
27])
28