File: kernel-zero_page.m4

package info (click to toggle)
zfs-linux 2.4.0-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 71,616 kB
  • sloc: ansic: 397,684; sh: 70,195; asm: 48,744; python: 8,163; makefile: 5,212; perl: 859
file content (27 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
dnl #
dnl # ZERO_PAGE() is an alias for emtpy_zero_page. On certain architectures
dnl # this is a GPL exported variable.
dnl #

dnl #
dnl # Checking if ZERO_PAGE is exported GPL-only
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_ZERO_PAGE], [
	ZFS_LINUX_TEST_SRC([zero_page], [
		#include <asm/pgtable.h>
	], [
		struct page *p __attribute__ ((unused));
		p = ZERO_PAGE(0);
	], [], [ZFS_META_LICENSE])
])

AC_DEFUN([ZFS_AC_KERNEL_ZERO_PAGE], [
	AC_MSG_CHECKING([whether ZERO_PAGE() is GPL-only])
	ZFS_LINUX_TEST_RESULT([zero_page_license], [
		AC_MSG_RESULT(no)
	], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(HAVE_ZERO_PAGE_GPL_ONLY, 1,
		    [ZERO_PAGE() is GPL-only])
	])
])