X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=configure;h=ffb7b7a9f1b4221ff7a40e301efcb3a828fb0aa8;hb=ec06701b5473894514b25e4054dd5597e25a22e8;hp=1a3b376886e70f4c577e6cf5b3f591e96f5d51fb;hpb=23aa63cbf5e712493d9439f888e426f89bb97857;p=mirror_spl-debian.git diff --git a/configure b/configure index 1a3b376..ffb7b7a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. +# Generated by GNU Autoconf 2.63 for spl 0.7.2. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -741,11 +741,11 @@ MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= +PACKAGE_NAME='spl' +PACKAGE_TARNAME='spl' +PACKAGE_VERSION='0.7.2' +PACKAGE_STRING='spl 0.7.2' +PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ @@ -791,6 +791,9 @@ CONFIG_KERNEL_FALSE CONFIG_KERNEL_TRUE CONFIG_USER_FALSE CONFIG_USER_TRUE +DEBUG_KMEM_TRACKING +DEBUG_KMEM +DEBUG_SPL DEBUG_CFLAGS KERNELCPPFLAGS KERNELMAKE_PARAMS @@ -799,8 +802,6 @@ LINUX_VERSION LINUX_OBJ LINUX SPL_CONFIG -DEFAULT_PACKAGE -VENDOR ALIEN_VERSION ALIEN HAVE_ALIEN @@ -810,13 +811,23 @@ HAVE_DPKGBUILD DPKG_VERSION DPKG HAVE_DPKG +SRPM_DEFINE_COMMON +SRPM_DEFINE_DKMS +SRPM_DEFINE_KMOD +SRPM_DEFINE_UTIL +RPM_DEFINE_COMMON +RPM_DEFINE_DKMS +RPM_DEFINE_KMOD +RPM_DEFINE_UTIL +RPM_SPEC_DIR RPMBUILD_VERSION RPMBUILD HAVE_RPMBUILD RPM_VERSION RPM HAVE_RPM -LICENSE +DEFAULT_PACKAGE +VENDOR CPP OTOOL64 OTOOL @@ -858,7 +869,6 @@ am__tar AMTAR am__leading_dot SET_MAKE -AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM @@ -899,9 +909,12 @@ SPL_META_LT_CURRENT SPL_META_AUTHOR SPL_META_DATA SPL_META_ALIAS +SPL_META_LICENSE +RELEASE SPL_META_RELEASE SPL_META_VERSION SPL_META_NAME +AWK target_alias host_alias build_alias @@ -951,7 +964,9 @@ with_pic enable_fast_install with_gnu_ld enable_libtool_lock +with_spec with_config +enable_linux_builtin with_linux with_linux_obj enable_debug @@ -1008,7 +1023,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1520,7 +1535,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. +\`configure' configures spl 0.7.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1568,7 +1583,7 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/spl] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1590,7 +1605,9 @@ _ACEOF fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of spl 0.7.2:";; + esac cat <<\_ACEOF Optional Features: @@ -1608,8 +1625,10 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-linux-builtin Configure for builtin in-tree kernel modules + [default=no] --enable-debug Enable generic debug support [default=no] - --enable-debug-kmem Enable basic kmem accounting [default=yes] + --enable-debug-kmem Enable basic kmem accounting [default=no] --enable-debug-kmem-tracking Enable detailed kmem tracking [default=no] --enable-atomic-spinlocks @@ -1621,6 +1640,7 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-spec=SPEC Spec files 'generic|redhat' --with-config=CONFIG Config file 'kernel|user|all|srpm' --with-linux=PATH Path to kernel source --with-linux-obj=PATH Path to kernel build objects @@ -1700,7 +1720,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure +spl configure 0.7.2 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1714,7 +1734,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was +It was created by spl $as_me 0.7.2, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2062,6 +2082,14 @@ fi + + + + + + + + @@ -2081,24 +2109,57 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + { $as_echo "$as_me:$LINENO: checking metadata" >&5 $as_echo_n "checking metadata... " >&6; } META="$srcdir/META" - _spl_ac_meta_got_file=no + _spl_ac_meta_type="none" if test -f "$META"; then - _spl_ac_meta_got_file=yes - - SPL_META_NAME=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - '(?:NAME|PROJECT|PACKAGE)' $META`; + _spl_ac_meta_type="META file" + + SPL_META_NAME=`$AWK -F ':[ \t]+' '$1 ~ /^ *(Name|Project|Package)$/ { print $2; exit }' $META`; if test -n "$SPL_META_NAME"; then cat >>confdefs.h <<_ACEOF @@ -2108,16 +2169,7 @@ _ACEOF fi - SPL_META_VERSION=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'VERSION' $META`; + SPL_META_VERSION=`$AWK -F ':[ \t]+' '$1 ~ /^ *Version$/ { print $2; exit }' $META`; if test -n "$SPL_META_VERSION"; then cat >>confdefs.h <<_ACEOF @@ -2127,16 +2179,25 @@ _ACEOF fi - SPL_META_RELEASE=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'RELEASE' $META`; + SPL_META_RELEASE=`$AWK -F ':[ \t]+' '$1 ~ /^ *Release$/ { print $2; exit }' $META`; + if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then + _match="${SPL_META_NAME}-${SPL_META_VERSION}" + _alias=$(git describe --match=${_match} 2>/dev/null) + _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + if test -n "${_release}"; then + SPL_META_RELEASE=${_release} + _spl_ac_meta_type="git describe" + else + _match="${SPL_META_NAME}-${SPL_META_VERSION}-${SPL_META_RELEASE}" + _alias=$(git describe --match=${_match} 2>/dev/null) + _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + if test -n "${_release}"; then + SPL_META_RELEASE=${_release} + _spl_ac_meta_type="git describe" + fi + fi + fi + if test -n "$SPL_META_RELEASE"; then cat >>confdefs.h <<_ACEOF @@ -2144,6 +2205,19 @@ cat >>confdefs.h <<_ACEOF _ACEOF + + RELEASE="$SPL_META_RELEASE" + + fi + + SPL_META_LICENSE=`$AWK -F ':[ \t]+' '$1 ~ /^ *License$/ { print $2; exit }' $META`; + if test -n "$SPL_META_LICENSE"; then + +cat >>confdefs.h <<_ACEOF +#define SPL_META_LICENSE "$SPL_META_LICENSE" +_ACEOF + + fi if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then @@ -2158,16 +2232,7 @@ _ACEOF fi - SPL_META_DATA=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'DATE' $META`; + SPL_META_DATA=`$AWK -F ':[ \t]+' '$1 ~ /^ *Date$/ { print $2; exit }' $META`; if test -n "$SPL_META_DATA"; then cat >>confdefs.h <<_ACEOF @@ -2177,16 +2242,7 @@ _ACEOF fi - SPL_META_AUTHOR=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'AUTHOR' $META`; + SPL_META_AUTHOR=`$AWK -F ':[ \t]+' '$1 ~ /^ *Author$/ { print $2; exit }' $META`; if test -n "$SPL_META_AUTHOR"; then cat >>confdefs.h <<_ACEOF @@ -2197,36 +2253,9 @@ _ACEOF fi - SPL_META_LT_CURRENT=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'LT_CURRENT' $META`; - SPL_META_LT_REVISION=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'LT_REVISION' $META`; - SPL_META_LT_AGE=`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key[:=]//i;"\ - -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(['\"])(.*)\1/\\$2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - 'LT_AGE' $META`; + SPL_META_LT_CURRENT=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Current$/ { print $2; exit }' $META`; + SPL_META_LT_REVISION=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Revision$/ { print $2; exit }' $META`; + SPL_META_LT_AGE=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Age$/ { print $2; exit }' $META`; if test -n "$SPL_META_LT_CURRENT" \ -o -n "$SPL_META_LT_REVISION" \ -o -n "$SPL_META_LT_AGE"; then @@ -2254,8 +2283,8 @@ _ACEOF fi fi - { $as_echo "$as_me:$LINENO: result: $_spl_ac_meta_got_file" >&5 -$as_echo "$_spl_ac_meta_got_file" >&6; } + { $as_echo "$as_me:$LINENO: result: $_spl_ac_meta_type" >&5 +$as_echo "$_spl_ac_meta_type" >&6; } ac_aux_dir= @@ -2289,6 +2318,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 @@ -2446,7 +2476,7 @@ fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=0;; esac AM_BACKSLASH='\' @@ -2794,48 +2824,6 @@ case $mkdir_p in */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} @@ -2899,8 +2887,8 @@ fi # Define the identity of the package. - PACKAGE=$SPL_META_NAME - VERSION=$SPL_META_VERSION + PACKAGE='spl' + VERSION='0.7.2' cat >>confdefs.h <<_ACEOF @@ -4166,8 +4154,8 @@ esac -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -4777,13 +4765,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4780: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4768: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4783: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4771: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4786: output\"" >&5) + (eval echo "\"\$as_me:4774: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5989,7 +5977,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5992 "configure"' > conftest.$ac_ext + echo '#line 5980 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7817,6 +7805,10 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= @@ -7842,11 +7834,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7845: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7837: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7849: \$? = $ac_status" >&5 + echo "$as_me:7841: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8181,11 +8173,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8184: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8176: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8188: \$? = $ac_status" >&5 + echo "$as_me:8180: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8286,11 +8278,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8289: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8281: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8293: \$? = $ac_status" >&5 + echo "$as_me:8285: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8341,11 +8333,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8344: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8336: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8348: \$? = $ac_status" >&5 + echo "$as_me:8340: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11144,7 +11136,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11147 "configure" +#line 11139 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11240,7 +11232,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11243 "configure" +#line 11235 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11469,13 +11461,65 @@ CC="$lt_save_CC" + { $as_echo "$as_me:$LINENO: checking spl author" >&5 +$as_echo_n "checking spl author... " >&6; } + { $as_echo "$as_me:$LINENO: result: $SPL_META_AUTHOR" >&5 +$as_echo "$SPL_META_AUTHOR" >&6; } + { $as_echo "$as_me:$LINENO: checking spl license" >&5 $as_echo_n "checking spl license... " >&6; } - LICENSE=GPL - { $as_echo "$as_me:$LINENO: result: $LICENSE" >&5 -$as_echo "$LICENSE" >&6; } - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + { $as_echo "$as_me:$LINENO: result: $SPL_META_LICENSE" >&5 +$as_echo "$SPL_META_LICENSE" >&6; } + + + + { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 +$as_echo_n "checking linux distribution... " >&6; } + if test -f /etc/toss-release ; then + VENDOR=toss ; + elif test -f /etc/fedora-release ; then + VENDOR=fedora ; + elif test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; + elif test -f /etc/SuSE-release ; then + VENDOR=sles ; + elif test -f /etc/slackware-version ; then + VENDOR=slackware ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; + else + VENDOR= ; + fi + { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 +$as_echo "$VENDOR" >&6; } + + { $as_echo "$as_me:$LINENO: checking default package type" >&5 +$as_echo_n "checking default package type... " >&6; } + case "$VENDOR" in + toss) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + fedora) DEFAULT_PACKAGE=rpm ;; + gentoo) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=tgz ;; + sles) DEFAULT_PACKAGE=rpm ;; + slackware) DEFAULT_PACKAGE=tgz ;; + lunar) DEFAULT_PACKAGE=tgz ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + *) DEFAULT_PACKAGE=rpm ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 +$as_echo "$DEFAULT_PACKAGE" >&6; } @@ -11518,6 +11562,39 @@ $as_echo "$HAVE_RPMBUILD" >&6; } fi + RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"' + RPM_DEFINE_UTIL= + RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"' + RPM_DEFINE_DKMS= + + SRPM_DEFINE_COMMON='--define "build_src_rpm 1"' + SRPM_DEFINE_UTIL= + SRPM_DEFINE_KMOD= + SRPM_DEFINE_DKMS= + + RPM_SPEC_DIR="rpm/generic" + +# Check whether --with-spec was given. +if test "${with_spec+set}" = set; then + withval=$with_spec; RPM_SPEC_DIR="rpm/$withval" +fi + + + { $as_echo "$as_me:$LINENO: checking whether spec files are available" >&5 +$as_echo_n "checking whether spec files are available... " >&6; } + { $as_echo "$as_me:$LINENO: result: yes ($RPM_SPEC_DIR/*.spec.in)" >&5 +$as_echo "yes ($RPM_SPEC_DIR/*.spec.in)" >&6; } + + + + + + + + + + + @@ -11601,63 +11678,30 @@ fi - { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 -$as_echo_n "checking linux distribution... " >&6; } - if test -f /etc/redhat-release ; then - VENDOR=redhat ; - elif test -f /etc/fedora-release ; then - VENDOR=fedora ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; - elif test -f /etc/SuSE-release ; then - VENDOR=sles ; - elif test -f /etc/slackware-version ; then - VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; - else - VENDOR= ; - fi - { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 -$as_echo "$VENDOR" >&6; } - - - { $as_echo "$as_me:$LINENO: checking default package type" >&5 -$as_echo_n "checking default package type... " >&6; } - case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - slackware) DEFAULT_PACKAGE=tgz ;; - *) DEFAULT_PACKAGE=rpm ;; - esac - - { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 -$as_echo "$DEFAULT_PACKAGE" >&6; } - - - - SPL_CONFIG=all + SPL_CONFIG=all # Check whether --with-config was given. if test "${with_config+set}" = set; then withval=$with_config; SPL_CONFIG="$withval" fi + # Check whether --enable-linux-builtin was given. +if test "${enable_linux_builtin+set}" = set; then + enableval=$enable_linux_builtin; +else + enable_linux_builtin=no +fi - { $as_echo "$as_me:$LINENO: checking spl config" >&5 + + { $as_echo "$as_me:$LINENO: checking spl config" >&5 $as_echo_n "checking spl config... " >&6; } - { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 + { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 $as_echo "$SPL_CONFIG" >&6; }; - case "$SPL_CONFIG" in - kernel) + case "$SPL_CONFIG" in + kernel) # Check whether --with-linux was given. @@ -11676,42 +11720,50 @@ fi { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 $as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ + /usr/src/linux-* \ 2>/dev/null | grep -v obj | tail -1) fi if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&5 -$as_echo "$as_me: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&2;} - { (exit 1); exit 1; }; } + kernelsrc="Not found" fi else if test "$kernelsrc" = "NONE"; then kernsrcver=NONE fi + withlinux=yes fi { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 $as_echo "$kernelsrc" >&6; } + if test ! -d "$kernelsrc"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed and then try again. If that fails, you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed and then try again. If that fails, you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&2;} + { (exit 1); exit 1; }; } + fi + { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} elif test -d ${kernelsrc}-obj/${target_cpu}/default; then kernelbuild=${kernelsrc}-obj/${target_cpu}/default @@ -11753,9 +11805,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi fi { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 @@ -11773,12 +11835,26 @@ $as_echo "$kernsrcver" >&6; } modpost=$LINUX/scripts/Makefile.modpost { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 $as_echo_n "checking kernel file name for module symbols... " >&6; } - if test -f "$modpost"; then + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers else LINUX_SYMBOLS=Module.symvers fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If you are building with a custom kernel, make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If you are building with a custom kernel, make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&2;} + { (exit 1); exit 1; }; } + fi else LINUX_SYMBOLS=NONE fi @@ -11811,16 +11887,19 @@ fi KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" + DEBUG_SPL="_with_debug" else KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" + DEBUG_SPL="_without_debug" fi + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } @@ -11829,20 +11908,28 @@ $as_echo "$enable_debug" >&6; } if test "${enable_debug_kmem+set}" = set; then enableval=$enable_debug_kmem; else - enable_debug_kmem=yes + enable_debug_kmem=no fi if test "x$enable_debug_kmem" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + DEBUG_KMEM="_with_debug_kmem" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + +else + + DEBUG_KMEM="_without_debug_kmem" + fi + { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 @@ -11859,28 +11946,29 @@ fi if test "x$enable_debug_kmem_tracking" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM_TRACKING 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + +else + + DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" + fi + { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 $as_echo "$enable_debug_kmem_tracking" >&6; } - - # Check whether --enable-atomic-spinlocks was given. -if test "${enable_atomic_spinlocks+set}" = set; then - enableval=$enable_atomic_spinlocks; -else - enable_atomic_spinlocks=check -fi - - + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -11891,14 +11979,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - int main (void) { - atomic64_t *ptr; - ; return 0; } @@ -11906,9 +11990,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11920,7 +12006,168 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - have_atomic64_t=yes + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 +$as_echo "$as_me: error: *** Unable to build an empty module." >&2;} + { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi + + + +fi + + rm -Rf build + + + + if test "x$cross_compiling" != xyes; then + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include "$LINUX/include/linux/license.h" + +int +main () +{ + + return !license_is_gpl_compatible( + "$SPL_META_LICENSE"); + + ; + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define SPL_IS_GPL_COMPATIBLE 1 +_ACEOF + + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + +fi + + + + # Check whether --enable-atomic-spinlocks was given. +if test "${enable_atomic_spinlocks+set}" = set; then + enableval=$enable_atomic_spinlocks; +else + enable_atomic_spinlocks=check +fi + + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_t *ptr __attribute__ ((unused)); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + have_atomic64_t=yes cat >>confdefs.h <<\_ACEOF #define HAVE_ATOMIC64_T 1 @@ -11993,8 +12240,11 @@ $as_echo_n "checking whether kernel defines atomic64_t... " >&6; } { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 $as_echo "$have_atomic64_t" >&6; } - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } + + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether old 2-argument shrinker exists" >&5 +$as_echo_n "checking whether old 2-argument shrinker exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12005,14 +12255,19 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include + #include + + int shrinker_cb(int nr_to_scan, gfp_t gfp_mask); int main (void) { - atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -12021,9 +12276,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12039,7 +12296,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_CMPXCHG 1 +#define HAVE_2ARGS_OLD_SHRINKER_CALLBACK 1 _ACEOF @@ -12049,17 +12306,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether old 3-argument shrinker exists" >&5 +$as_echo_n "checking whether old 3-argument shrinker exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12070,13 +12318,20 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + int shrinker_cb(struct shrinker *, int nr_to_scan, + gfp_t gfp_mask); int main (void) { - atomic64_xchg((atomic64_t *)NULL, 0); + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -12085,9 +12340,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12099,11 +12356,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_XCHG 1 +#define HAVE_3ARGS_SHRINKER_CALLBACK 1 _ACEOF @@ -12111,19 +12368,10 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -$as_echo_n "checking whether kernel defines uintptr_t... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether new 2-argument shrinker exists" >&5 +$as_echo_n "checking whether new 2-argument shrinker exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12134,13 +12382,20 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + int shrinker_cb(struct shrinker *, + struct shrink_control *sc); int main (void) { - uintptr_t *ptr; + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -12149,9 +12404,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12163,11 +12420,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 +#define HAVE_2ARGS_NEW_SHRINKER_CALLBACK 1 _ACEOF @@ -12175,19 +12432,10 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 -$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether ->count_objects callback exists" >&5 +$as_echo_n "checking whether ->count_objects callback exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12198,14 +12446,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + unsigned long shrinker_cb( + struct shrinker *, + struct shrink_control *sc); int main (void) { - struct work_struct work; - INIT_WORK(&work, NULL, NULL); + struct shrinker cache_shrinker = { + .count_objects = shrinker_cb, + .scan_objects = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -12214,9 +12470,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12228,11 +12486,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_INIT_WORK 1 +#define HAVE_SPLIT_SHRINKER_CALLBACK 1 _ACEOF @@ -12240,8 +12498,33 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: error" >&5 +$as_echo "$as_me: error: error" >&2;} + { (exit 1); exit 1; }; } + + + +fi + + rm -Rf build + + + + + +fi + + rm -Rf build + + + + + +fi + + rm -Rf build + + @@ -12250,9 +12533,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" + - { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 -$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 +$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12269,7 +12554,8 @@ int main (void) { - return register_sysctl_table(NULL,0); + struct ctl_table ctl __attribute__ ((unused)); + ctl.ctl_name = 0; ; return 0; @@ -12278,9 +12564,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12296,7 +12584,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_REGISTER_SYSCTL 1 +#define HAVE_CTL_NAME 1 _ACEOF @@ -12316,8 +12604,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 -$as_echo_n "checking whether set_shrinker() available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5 +$as_echo_n "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12328,14 +12616,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #if defined(CONFIG_TRIM_UNUSED_KSYMS) + #error CONFIG_TRIM_UNUSED_KSYMS not defined + #endif int main (void) { - return set_shrinker(DEFAULT_SEEKS, NULL); - ; return 0; } @@ -12343,9 +12631,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12360,17 +12650,19 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_SHRINKER 1 -_ACEOF - - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** This kernel has unused symbols trimming enabled, please disable. + *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&5 +$as_echo "$as_me: error: + *** This kernel has unused symbols trimming enabled, please disable. + *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&2;} + { (exit 1); exit 1; }; } @@ -12380,10 +12672,10 @@ fi - { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5 -$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + + { $as_echo "$as_me:$LINENO: checking whether PDE_DATA() is available" >&5 +$as_echo_n "checking whether PDE_DATA() is available... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -12394,19 +12686,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - - int shrinker_cb(struct shrinker *, int, unsigned int); + #include int main (void) { - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); + PDE_DATA(NULL); ; return 0; @@ -12415,9 +12701,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12428,22 +12716,11 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_SHRINKER_CALLBACK 1 -_ACEOF - - + rc=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - + rc=1 fi @@ -12451,10 +12728,61 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" + if test $rc -ne 0; then : - { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 -$as_echo_n "checking whether struct path used in struct nameidata... " >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]PDE_DATA[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(PDE_DATA)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PDE_DATA 1 +_ACEOF + + + fi + fi + + + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() requires const struct path *" >&5 +$as_echo_n "checking whether set_fs_pwd() requires const struct path *... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12465,16 +12793,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, const struct path *) + = set_fs_pwd; int main (void) { - struct nameidata nd; - - nd.path.mnt = NULL; - nd.path.dentry = NULL; + return 0; ; return 0; @@ -12483,9 +12813,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12501,7 +12833,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_PATH_IN_NAMEIDATA 1 +#define HAVE_SET_FS_PWD_WITH_CONST 1 _ACEOF @@ -12509,60 +12841,6 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 -$as_echo_n "checking whether symbol task_curr is exported... " >&6; } - grep -q -E '[[:space:]]task_curr[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/sched.c; do - grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 -$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12573,15 +12851,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, struct path *) + = set_fs_pwd; int main (void) { - #ifndef CTL_UNNUMBERED - #error CTL_UNNUMBERED undefined - #endif + return 0; ; return 0; @@ -12590,9 +12871,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12604,20 +12887,16 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_UNNUMBERED 1 -_ACEOF - + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: unknown" >&5 +$as_echo "$as_me: error: unknown" >&2;} + { (exit 1); exit 1; }; } @@ -12628,8 +12907,16 @@ fi - { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 -$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12640,14 +12927,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct ctl_table ctl; - ctl.ctl_name = 0; + vfs_unlink((struct inode *) NULL, (struct dentry *) NULL); ; return 0; @@ -12656,9 +12942,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12674,7 +12962,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_NAME 1 +#define HAVE_2ARGS_VFS_UNLINK 1 _ACEOF @@ -12684,17 +12972,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5 -$as_echo_n "checking whether fls64() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 3 args" >&5 +$as_echo_n "checking whether vfs_unlink() wants 3 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12705,13 +12984,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - return fls64(0); + vfs_unlink((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL); ; return 0; @@ -12720,9 +13001,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12734,11 +13017,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FLS64 1 +#define HAVE_3ARGS_VFS_UNLINK 1 _ACEOF @@ -12746,8 +13029,9 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } @@ -12758,51 +13042,16 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 -$as_echo_n "checking whether symbol device_create is exported... " >&6; } - grep -q -E '[[:space:]]device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/core.c; do - grep -q -E "EXPORT_SYMBOL.*(device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF +fi - fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 -$as_echo_n "checking whether device_create() wants 5 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12813,13 +13062,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - device_create(NULL, NULL, 0, NULL, "%d", 1); + vfs_rename((struct inode *) NULL, (struct dentry *) NULL, + (struct inode *) NULL, (struct dentry *) NULL); ; return 0; @@ -12828,9 +13078,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12846,7 +13098,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_DEVICE_CREATE 1 +#define HAVE_4ARGS_VFS_RENAME 1 _ACEOF @@ -12856,101 +13108,69 @@ sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 5 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 5 args... " >&6; } - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 -$as_echo_n "checking whether symbol class_device_create is exported... " >&6; } - grep -q -E '[[:space:]]class_device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/class.c; do - grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +int +main (void) +{ -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF + vfs_rename((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL); - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 _ACEOF - fi - - - { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 -$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; } - grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/time.c; do - grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +#define HAVE_5ARGS_VFS_RENAME 1 _ACEOF - fi - +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 -$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 6 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 6 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12961,14 +13181,19 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec) { } + #include int main (void) { + vfs_rename((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL, + (unsigned int) 0); + ; return 0; } @@ -12976,9 +13201,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12990,19 +13217,36 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_6ARGS_VFS_RENAME 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } + + + +fi + + rm -Rf build + + + + + +fi + + rm -Rf build -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 -_ACEOF @@ -13014,8 +13258,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 -$as_echo_n "checking whether timespec_sub() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5 +$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13026,14 +13270,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct timespec a, b, c = { 0 }; - c = timespec_sub(a, b); + vfs_fsync(NULL, 0); ; return 0; @@ -13042,9 +13285,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13060,7 +13305,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMESPEC_SUB 1 +#define HAVE_2ARGS_VFS_FSYNC 1 _ACEOF @@ -13080,8 +13325,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 -$as_echo_n "checking whether init_utsname() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether truncate_range() inode operation is available" >&5 +$as_echo_n "checking whether truncate_range() inode operation is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13092,13 +13337,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct new_utsname *a = init_utsname(); + struct inode_operations ops; + ops.truncate_range = NULL; ; return 0; @@ -13107,9 +13353,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13125,7 +13373,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INIT_UTSNAME 1 +#define HAVE_INODE_TRUNCATE_RANGE 1 _ACEOF @@ -13145,8 +13393,10 @@ fi - { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 -$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 +$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -13157,13 +13407,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include int main (void) { - return 0; + static struct fs_struct fs; + spin_lock_init(&fs.lock); ; return 0; @@ -13172,9 +13424,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13186,14 +13440,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FDTABLE_HEADER 1 +#define HAVE_FS_STRUCT_SPINLOCK 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else $as_echo "$as_me: failed program was:" >&5 @@ -13204,17 +13457,58 @@ $as_echo "no" >&6; } - fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether kuid_t/kgid_t is available" >&5 +$as_echo_n "checking whether kuid_t/kgid_t is available... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kuid_t userid = KUIDT_INIT(0); + kgid_t groupid = KGIDT_INIT(0); + + ; + return 0; +} + +_ACEOF + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 -$as_echo_n "checking whether files_fdtable() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13225,18 +13519,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - #ifdef HAVE_FDTABLE_HEADER - #include - #endif + #include int main (void) { - struct files_struct *files = current->files; - struct fdtable *fdt = files_fdtable(files); + kuid_t userid = 0; + kgid_t groupid = 0; ; return 0; @@ -13245,9 +13535,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13259,14 +13551,29 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes; optional" >&5 +$as_echo "yes; optional" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: yes; mandatory" >&5 +$as_echo "yes; mandatory" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FILES_FDTABLE 1 +#define HAVE_KUIDGID_T 1 _ACEOF + + +fi + + rm -Rf build + + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -13283,8 +13590,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 -$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13295,13 +13603,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - return 0; + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -13310,9 +13621,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13324,14 +13637,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_UACCESS_HEADER 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else $as_echo "$as_me: failed program was:" >&5 @@ -13342,7 +13654,6 @@ $as_echo "no" >&6; } - fi rm -Rf build @@ -13350,9 +13661,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 -$as_echo_n "checking whether kmalloc_node() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 +$as_echo_n "checking whether iops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13363,13 +13673,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - void *a = kmalloc_node(1, GFP_KERNEL, 0); + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -13378,9 +13691,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13396,7 +13711,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KMALLOC_NODE 1 +#define HAVE_INODE_FALLOCATE 1 _ACEOF @@ -13416,49 +13731,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 -$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } - grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 -$as_echo_n "checking whether struct inode has i_mutex... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13470,14 +13744,15 @@ cat >>conftest.$ac_ext <<_ACEOF #include - #include int main (void) { - struct inode i; - mutex_init(&i.i_mutex); + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -13486,9 +13761,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13504,7 +13781,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_I_MUTEX 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -13524,8 +13801,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 -$as_echo_n "checking whether struct mutex has owner... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_INFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13536,15 +13814,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #if !defined(CONFIG_ZLIB_INFLATE) && \ + !defined(CONFIG_ZLIB_INFLATE_MODULE) + #error CONFIG_ZLIB_INFLATE not defined + #endif int main (void) { - struct mutex mtx; - mtx.owner = NULL; - ; return 0; } @@ -13552,9 +13830,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13569,17 +13849,19 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_OWNER 1 -_ACEOF - - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** This kernel does not include the required zlib inflate support. + *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&5 +$as_echo "$as_me: error: + *** This kernel does not include the required zlib inflate support. + *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&2;} + { (exit 1); exit 1; }; } @@ -13590,8 +13872,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 -$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13602,16 +13884,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #if !defined(CONFIG_ZLIB_DEFLATE) && \ + !defined(CONFIG_ZLIB_DEFLATE_MODULE) + #error CONFIG_ZLIB_DEFLATE not defined + #endif int main (void) { - struct mutex mutex; - mutex_init(&mutex); - mutex_lock_nested(&mutex, 0); - ; return 0; } @@ -13619,9 +13900,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13636,17 +13919,19 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_LOCK_NESTED 1 -_ACEOF - - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** This kernel does not include the required zlib deflate support. + *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&5 +$as_echo "$as_me: error: + *** This kernel does not include the required zlib deflate support. + *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&2;} + { (exit 1); exit 1; }; } @@ -13656,9 +13941,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 -$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5 +$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13669,13 +13953,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - on_each_cpu(NULL, NULL, 0); + return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); ; return 0; @@ -13684,9 +13968,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13702,7 +13988,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_ON_EACH_CPU 1 +#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1 _ACEOF @@ -13722,272 +14008,153 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 -$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } - grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5 +$as_echo_n "checking whether struct shrink_control exists... " >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 -_ACEOF - fi + #include +int +main (void) +{ + struct shrink_control sc __attribute__ ((unused)); - { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 -$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } - grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + sc.nr_to_scan = 0; + sc.gfp_mask = GFP_KERNEL; - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 _ACEOF - fi - else + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 +#define HAVE_SHRINK_CONTROL_STRUCT 1 _ACEOF - fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 -$as_echo_n "checking whether symbol *_pgdat exist... " >&6; } - grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null - rc=$? - if test $rc -eq 0; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_HELPERS 1 -_ACEOF +fi - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } - grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5 +$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - fi + #include +int +main (void) +{ - { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } - grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)) = + __RAW_SPIN_LOCK_INITIALIZER(dummy_lock); + dummy_semaphore.wait_lock = dummy_lock; - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 _ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 -$as_echo_n "checking whether symbol next_zone is exported... " >&6; } - grep -q -E '[[:space:]]next_zone[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 -_ACEOF + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 +#define RWSEM_SPINLOCK_IS_RAW 1 _ACEOF - fi - +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 -$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } - grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF + rm -Rf build - fi + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 -$as_echo_n "checking whether global_page_state() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has member activity" >&5 +$as_echo_n "checking whether struct rw_semaphore has member activity... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -13998,14 +14165,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - unsigned long state; - state = global_page_state(0); + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + dummy_semaphore.activity = 0; ; return 0; @@ -14014,9 +14181,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14032,7 +14201,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GLOBAL_PAGE_STATE 1 +#define HAVE_RWSEM_ACTIVITY 1 _ACEOF @@ -14050,10 +14219,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 -$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has atomic_long_t member count" >&5 +$as_echo_n "checking whether struct rw_semaphore has atomic_long_t member count... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -14064,14 +14236,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_FREE_PAGES; + DECLARE_RWSEM(dummy_semaphore); + (void) atomic_long_read(&dummy_semaphore.count); ; return 0; @@ -14080,9 +14252,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14098,7 +14272,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 +#define HAVE_RWSEM_ATOMIC_LONG_COUNT 1 _ACEOF @@ -14116,10 +14290,10 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether header linux/sched/rt.h exists" >&5 +$as_echo_n "checking whether header linux/sched/rt.h exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14130,14 +14304,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_INACTIVE; + return 0; ; return 0; @@ -14146,9 +14320,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14160,13 +14336,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 +#define HAVE_SCHED_RT_HEADER 1 _ACEOF + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 @@ -14183,8 +14359,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether header linux/sched/signal.h exists" >&5 +$as_echo_n "checking whether header linux/sched/signal.h exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14195,14 +14371,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_INACTIVE_ANON; + return 0; ; return 0; @@ -14211,9 +14387,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14225,13 +14403,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 +#define HAVE_SCHED_SIGNAL_HEADER 1 _ACEOF + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 @@ -14248,8 +14426,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 4 args" >&5 +$as_echo_n "checking whether vfs_getattr() wants 4 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14260,14 +14439,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_INACTIVE_FILE; + vfs_getattr((const struct path *)NULL, + (struct kstat *)NULL, + (u32)0, + (unsigned int)0); ; return 0; @@ -14276,9 +14457,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14294,7 +14477,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 +#define HAVE_4ARGS_VFS_GETATTR 1 _ACEOF @@ -14314,8 +14497,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 3 args" >&5 +$as_echo_n "checking whether vfs_getattr() wants 3 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14326,14 +14509,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_ACTIVE; + vfs_getattr((struct vfsmount *)NULL, + (struct dentry *)NULL, + (struct kstat *)NULL); ; return 0; @@ -14342,9 +14526,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14360,7 +14546,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 +#define HAVE_3ARGS_VFS_GETATTR 1 _ACEOF @@ -14379,8 +14565,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 2 args" >&5 +$as_echo_n "checking whether vfs_getattr() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14391,14 +14578,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_ACTIVE_ANON; + vfs_getattr((struct path *) NULL, + (struct kstat *)NULL); ; return 0; @@ -14407,9 +14594,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14425,7 +14614,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 +#define HAVE_2ARGS_VFS_GETATTR 1 _ACEOF @@ -14444,8 +14633,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether usleep_range() is available" >&5 +$as_echo_n "checking whether usleep_range() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14456,14 +14646,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_ACTIVE_FILE; + usleep_range(0, 0); ; return 0; @@ -14472,9 +14661,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14490,7 +14681,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 +#define HAVE_USLEEP_RANGE 1 _ACEOF @@ -14510,8 +14701,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 -$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has allocflags" >&5 +$as_echo_n "checking whether struct kmem_cache has allocflags... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14522,26 +14713,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include int main (void) { - #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) - #error "global_page_state needs NR_FREE_PAGES" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) - #error "global_page_state needs NR_ACTIVE*" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) - #error "global_page_state needs NR_INACTIVE*" - #endif + struct kmem_cache cachep __attribute__ ((unused)); + cachep.allocflags = GFP_KERNEL; ; return 0; @@ -14550,9 +14729,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14564,153 +14745,99 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define NEED_GET_ZONE_COUNTS 1 +#define HAVE_KMEM_CACHE_ALLOCFLAGS 1 _ACEOF - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF + { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has gfpflags" >&5 +$as_echo_n "checking whether struct kmem_cache has gfpflags... " >&6; } - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF - - fi - +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include -fi +int +main (void) +{ - rm -Rf build + struct kmem_cache cachep __attribute__ ((unused)); + cachep.gfpflags = GFP_KERNEL; + ; + return 0; +} +_ACEOF - { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5 -$as_echo_n "checking whether symbol user_path_at is exported... " >&6; } - grep -q -E '[[:space:]]user_path_at[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 +#define HAVE_KMEM_CACHE_GFPFLAGS 1 _ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 -$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } - grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + rm -Rf build -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF - fi + +fi + + rm -Rf build + - { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 -$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether wait_on_bit() takes an action" >&5 +$as_echo_n "checking whether wait_on_bit() takes an action... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -14721,14 +14848,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include + #include int main (void) { - set_fs_pwd(NULL, NULL); + int (*action)(void *) = NULL; + wait_on_bit(NULL, 0, action, 0); ; return 0; @@ -14737,9 +14864,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14755,7 +14884,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_SET_FS_PWD 1 +#define HAVE_WAIT_ON_BIT_ACTION 1 _ACEOF @@ -14774,8 +14903,11 @@ fi - { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 -$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether inode_lock_shared() exists" >&5 +$as_echo_n "checking whether inode_lock_shared() exists... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -14792,7 +14924,8 @@ int main (void) { - vfs_unlink(NULL, NULL); + struct inode *inode = NULL; + inode_lock_shared(inode); ; return 0; @@ -14801,9 +14934,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14819,7 +14954,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_VFS_UNLINK 1 +#define HAVE_INODE_LOCK_SHARED 1 _ACEOF @@ -14837,9 +14972,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" + - { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 -$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether group_info->gid exists" >&5 +$as_echo_n "checking whether group_info->gid exists... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -14850,13 +14989,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - vfs_rename(NULL, NULL, NULL, NULL); + struct group_info *gi = groups_alloc(1); + gi->gid[0] = KGIDT_INIT(0); ; return 0; @@ -14865,9 +15005,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14883,7 +15025,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_4ARGS_VFS_RENAME 1 +#define HAVE_GROUP_INFO_GID 1 _ACEOF @@ -14901,10 +15043,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 -$as_echo_n "checking whether struct cred exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether kmem_cache_create_usercopy() exists" >&5 +$as_echo_n "checking whether kmem_cache_create_usercopy() exists... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -14915,14 +15060,26 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + static void ctor(void *foo) + { + // fake ctor + } int main (void) { - struct cred *cr; - cr = NULL; + struct kmem_cache *skc_linux_cache; + const char *name = "test"; + size_t size = 4096; + size_t align = 8; + unsigned long flags = 0; + size_t useroffset = 0; + size_t usersize = size - useroffset; + + skc_linux_cache = kmem_cache_create_usercopy( + name, size, align, flags, useroffset, usersize, ctor); ; return 0; @@ -14931,9 +15088,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14949,7 +15108,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CRED_STRUCT 1 +#define HAVE_KMEM_CACHE_CREATE_USERCOPY 1 _ACEOF @@ -14967,92 +15126,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 -$as_echo_n "checking whether symbol groups_search is exported... " >&6; } - grep -q -E '[[:space:]]groups_search[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 -$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } - grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 -$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether wait_queue_entry_t exists" >&5 +$as_echo_n "checking whether wait_queue_entry_t exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15063,13 +15141,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - proc_dostring(NULL, 0, NULL, NULL, NULL); + wait_queue_entry_t *entry __attribute__ ((unused)); ; return 0; @@ -15078,9 +15156,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15096,7 +15176,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_PROC_HANDLER 1 +#define HAVE_WAIT_QUEUE_ENTRY_T 1 _ACEOF @@ -15116,49 +15196,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5 -$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } - grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5 -$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether wq_head->head and wq_entry->entry exist" >&5 +$as_echo_n "checking whether wq_head->head and wq_entry->entry exist... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15169,13 +15208,27 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + #ifdef HAVE_WAIT_QUEUE_ENTRY_T + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_entry_t spl_wait_queue_entry_t; + #else + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_t spl_wait_queue_entry_t; + #endif int main (void) { - file_fsync(NULL, NULL, 0); + spl_wait_queue_head_t wq_head; + spl_wait_queue_entry_t wq_entry; + struct list_head *head __attribute__ ((unused)); + struct list_head *entry __attribute__ ((unused)); + + head = &wq_head.head; + entry = &wq_entry.entry; ; return 0; @@ -15184,9 +15237,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15202,7 +15257,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_FILE_FSYNC 1 +#define HAVE_WAIT_QUEUE_HEAD_ENTRY 1 _ACEOF @@ -15221,65 +15276,9 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 -$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } - grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in lib/rwsem-spinlock.c; do - grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF - - fi - - ;; - user) - - if test "x$AWK" != xgawk; then - - { { $as_echo "$as_me:$LINENO: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&5 -$as_echo "$as_me: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&2;} - { (exit 1); exit 1; }; } - -fi - - - ;; - all) + user) ;; + all) # Check whether --with-linux was given. @@ -15298,42 +15297,50 @@ fi { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 $as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ + /usr/src/linux-* \ 2>/dev/null | grep -v obj | tail -1) fi if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&5 -$as_echo "$as_me: error: - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option." >&2;} - { (exit 1); exit 1; }; } + kernelsrc="Not found" fi else if test "$kernelsrc" = "NONE"; then kernsrcver=NONE fi + withlinux=yes fi { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 $as_echo "$kernelsrc" >&6; } + if test ! -d "$kernelsrc"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed and then try again. If that fails, you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed and then try again. If that fails, you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&2;} + { (exit 1); exit 1; }; } + fi + { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} elif test -d ${kernelsrc}-obj/${target_cpu}/default; then kernelbuild=${kernelsrc}-obj/${target_cpu}/default @@ -15375,9 +15382,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} else { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi fi { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 @@ -15395,12 +15412,26 @@ $as_echo "$kernsrcver" >&6; } modpost=$LINUX/scripts/Makefile.modpost { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 $as_echo_n "checking kernel file name for module symbols... " >&6; } - if test -f "$modpost"; then + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then if grep -q Modules.symvers $modpost; then LINUX_SYMBOLS=Modules.symvers else LINUX_SYMBOLS=Module.symvers fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If you are building with a custom kernel, make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If you are building with a custom kernel, make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&2;} + { (exit 1); exit 1; }; } + fi else LINUX_SYMBOLS=NONE fi @@ -15433,16 +15464,19 @@ fi KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" + DEBUG_SPL="_with_debug" else KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" + DEBUG_SPL="_without_debug" fi + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } @@ -15451,20 +15485,28 @@ $as_echo "$enable_debug" >&6; } if test "${enable_debug_kmem+set}" = set; then enableval=$enable_debug_kmem; else - enable_debug_kmem=yes + enable_debug_kmem=no fi if test "x$enable_debug_kmem" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + DEBUG_KMEM="_with_debug_kmem" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + +else + + DEBUG_KMEM="_without_debug_kmem" + fi + { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5 @@ -15481,19 +15523,177 @@ fi if test "x$enable_debug_kmem_tracking" = xyes; then + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking" + cat >>confdefs.h <<\_ACEOF #define DEBUG_KMEM_TRACKING 1 _ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING" + +else + + DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking" + +fi + + + + { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 +$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 +$as_echo "$enable_debug_kmem_tracking" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 +$as_echo "$as_me: error: *** Unable to build an empty module." >&2;} + { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Unable to build an empty module. + *** Please run 'make scripts' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi + + + +fi + + rm -Rf build + + + + if test "x$cross_compiling" != xyes; then + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include "$LINUX/include/linux/license.h" + +int +main () +{ + + return !license_is_gpl_compatible( + "$SPL_META_LICENSE"); + + ; + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define SPL_IS_GPL_COMPATIBLE 1 +_ACEOF + + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi - { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5 -$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } - { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 -$as_echo "$enable_debug_kmem_tracking" >&6; } - # Check whether --enable-atomic-spinlocks was given. if test "${enable_atomic_spinlocks+set}" = set; then @@ -15513,13 +15713,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - atomic64_t *ptr; + atomic64_t *ptr __attribute__ ((unused)); ; return 0; @@ -15528,9 +15728,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15615,8 +15817,11 @@ $as_echo_n "checking whether kernel defines atomic64_t... " >&6; } { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5 $as_echo "$have_atomic64_t" >&6; } - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; } + + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether old 2-argument shrinker exists" >&5 +$as_echo_n "checking whether old 2-argument shrinker exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15627,14 +15832,19 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include + #include + + int shrinker_cb(int nr_to_scan, gfp_t gfp_mask); int main (void) { - atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -15643,9 +15853,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15661,7 +15873,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_CMPXCHG 1 +#define HAVE_2ARGS_OLD_SHRINKER_CALLBACK 1 _ACEOF @@ -15671,17 +15883,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5 -$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether old 3-argument shrinker exists" >&5 +$as_echo_n "checking whether old 3-argument shrinker exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15692,13 +15895,20 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + int shrinker_cb(struct shrinker *, int nr_to_scan, + gfp_t gfp_mask); int main (void) { - atomic64_xchg((atomic64_t *)NULL, 0); + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -15707,9 +15917,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15721,11 +15933,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ATOMIC64_XCHG 1 +#define HAVE_3ARGS_SHRINKER_CALLBACK 1 _ACEOF @@ -15733,19 +15945,74 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether new 2-argument shrinker exists" >&5 +$as_echo_n "checking whether new 2-argument shrinker exists... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi - rm -Rf build + #include + + int shrinker_cb(struct shrinker *, + struct shrink_control *sc); + +int +main (void) +{ + + struct shrinker cache_shrinker = { + .shrink = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_NEW_SHRINKER_CALLBACK 1 +_ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 -$as_echo_n "checking whether kernel defines uintptr_t... " >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether ->count_objects callback exists" >&5 +$as_echo_n "checking whether ->count_objects callback exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15756,13 +16023,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + unsigned long shrinker_cb( + struct shrinker *, + struct shrink_control *sc); int main (void) { - uintptr_t *ptr; + struct shrinker cache_shrinker = { + .count_objects = shrinker_cb, + .scan_objects = shrinker_cb, + .seeks = DEFAULT_SEEKS, + }; + register_shrinker(&cache_shrinker); ; return 0; @@ -15771,9 +16047,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15785,11 +16063,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 +#define HAVE_SPLIT_SHRINKER_CALLBACK 1 _ACEOF @@ -15797,8 +16075,33 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: error" >&5 +$as_echo "$as_me: error: error" >&2;} + { (exit 1); exit 1; }; } + + + +fi + + rm -Rf build + + + + + +fi + + rm -Rf build + + + + + +fi + + rm -Rf build + + @@ -15807,9 +16110,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" + - { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 -$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 +$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15820,14 +16125,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct work_struct work; - INIT_WORK(&work, NULL, NULL); + struct ctl_table ctl __attribute__ ((unused)); + ctl.ctl_name = 0; ; return 0; @@ -15836,9 +16141,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15854,7 +16161,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_INIT_WORK 1 +#define HAVE_CTL_NAME 1 _ACEOF @@ -15873,8 +16180,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 -$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5 +$as_echo_n "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15885,14 +16193,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #if defined(CONFIG_TRIM_UNUSED_KSYMS) + #error CONFIG_TRIM_UNUSED_KSYMS not defined + #endif int main (void) { - return register_sysctl_table(NULL,0); - ; return 0; } @@ -15900,9 +16208,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15917,17 +16227,19 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_REGISTER_SYSCTL 1 -_ACEOF - - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** This kernel has unused symbols trimming enabled, please disable. + *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&5 +$as_echo "$as_me: error: + *** This kernel has unused symbols trimming enabled, please disable. + *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&2;} + { (exit 1); exit 1; }; } @@ -15938,8 +16250,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 -$as_echo_n "checking whether set_shrinker() available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether PDE_DATA() is available" >&5 +$as_echo_n "checking whether PDE_DATA() is available... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -15950,13 +16263,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - return set_shrinker(DEFAULT_SEEKS, NULL); + PDE_DATA(NULL); ; return 0; @@ -15965,9 +16278,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15978,34 +16293,73 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_SHRINKER 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]PDE_DATA[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(PDE_DATA)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_PDE_DATA 1 +_ACEOF - rm -Rf build + fi + fi - { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5 -$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() requires const struct path *" >&5 +$as_echo_n "checking whether set_fs_pwd() requires const struct path *... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16016,19 +16370,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - - int shrinker_cb(struct shrinker *, int, unsigned int); + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, const struct path *) + = set_fs_pwd; int main (void) { - struct shrinker cache_shrinker = { - .shrink = shrinker_cb, - .seeks = DEFAULT_SEEKS, - }; - register_shrinker(&cache_shrinker); + return 0; ; return 0; @@ -16037,9 +16390,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16055,7 +16410,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_SHRINKER_CALLBACK 1 +#define HAVE_SET_FS_PWD_WITH_CONST 1 _ACEOF @@ -16063,20 +16418,6 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 -$as_echo_n "checking whether struct path used in struct nameidata... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16087,16 +16428,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + #include + void (*const set_fs_pwd_func) + (struct fs_struct *, struct path *) + = set_fs_pwd; int main (void) { - struct nameidata nd; - - nd.path.mnt = NULL; - nd.path.dentry = NULL; + return 0; ; return 0; @@ -16105,9 +16448,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16119,20 +16464,16 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PATH_IN_NAMEIDATA 1 -_ACEOF - + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: unknown" >&5 +$as_echo "$as_me: error: unknown" >&2;} + { (exit 1); exit 1; }; } @@ -16143,48 +16484,73 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 -$as_echo_n "checking whether symbol task_curr is exported... " >&6; } - grep -q -E '[[:space:]]task_curr[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/sched.c; do - grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_unlink((struct inode *) NULL, (struct dentry *) NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TASK_CURR 1 +#define HAVE_2ARGS_VFS_UNLINK 1 _ACEOF - fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 -$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 3 args" >&5 +$as_echo_n "checking whether vfs_unlink() wants 3 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16195,15 +16561,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - #ifndef CTL_UNNUMBERED - #error CTL_UNNUMBERED undefined - #endif + vfs_unlink((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL); ; return 0; @@ -16212,9 +16578,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16226,11 +16594,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_UNNUMBERED 1 +#define HAVE_3ARGS_VFS_UNLINK 1 _ACEOF @@ -16238,8 +16606,9 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } @@ -16250,8 +16619,16 @@ fi - { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 -$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16262,14 +16639,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct ctl_table ctl; - ctl.ctl_name = 0; + vfs_rename((struct inode *) NULL, (struct dentry *) NULL, + (struct inode *) NULL, (struct dentry *) NULL); ; return 0; @@ -16278,9 +16655,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16296,7 +16675,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_NAME 1 +#define HAVE_4ARGS_VFS_RENAME 1 _ACEOF @@ -16306,17 +16685,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5 -$as_echo_n "checking whether fls64() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 5 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 5 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16327,13 +16697,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - return fls64(0); + vfs_rename((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL); ; return 0; @@ -16342,9 +16716,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16356,11 +16732,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FLS64 1 +#define HAVE_5ARGS_VFS_RENAME 1 _ACEOF @@ -16368,63 +16744,10 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 -$as_echo_n "checking whether symbol device_create is exported... " >&6; } - grep -q -E '[[:space:]]device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/core.c; do - grep -q -E "EXPORT_SYMBOL.*(device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVICE_CREATE 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 -$as_echo_n "checking whether device_create() wants 5 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 6 args" >&5 +$as_echo_n "checking whether vfs_rename() wants 6 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16435,13 +16758,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - device_create(NULL, NULL, 0, NULL, "%d", 1); + vfs_rename((struct inode *) NULL, + (struct dentry *) NULL, + (struct inode *) NULL, + (struct dentry *) NULL, + (struct inode **) NULL, + (unsigned int) 0); ; return 0; @@ -16450,9 +16778,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16464,11 +16794,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_DEVICE_CREATE 1 +#define HAVE_6ARGS_VFS_RENAME 1 _ACEOF @@ -16476,8 +16806,9 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } @@ -16486,93 +16817,26 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 -$as_echo_n "checking whether symbol class_device_create is exported... " >&6; } - grep -q -E '[[:space:]]class_device_create[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in drivers/base/class.c; do - grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLASS_DEVICE_CREATE 1 -_ACEOF - fi +fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 -$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; } - grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in kernel/time.c; do - grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 -_ACEOF + rm -Rf build - fi - { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 -$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5 +$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16583,14 +16847,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - void set_normalized_timespec(struct timespec *ts, - time_t sec, long nsec) { } + #include int main (void) { + vfs_fsync(NULL, 0); + ; return 0; } @@ -16598,9 +16862,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16612,21 +16878,21 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 +#define HAVE_2ARGS_VFS_FSYNC 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi @@ -16636,8 +16902,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 -$as_echo_n "checking whether timespec_sub() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether truncate_range() inode operation is available" >&5 +$as_echo_n "checking whether truncate_range() inode operation is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16648,14 +16914,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct timespec a, b, c = { 0 }; - c = timespec_sub(a, b); + struct inode_operations ops; + ops.truncate_range = NULL; ; return 0; @@ -16664,9 +16930,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16682,7 +16950,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMESPEC_SUB 1 +#define HAVE_INODE_TRUNCATE_RANGE 1 _ACEOF @@ -16702,8 +16970,10 @@ fi - { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 -$as_echo_n "checking whether init_utsname() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5 +$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -16714,13 +16984,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include int main (void) { - struct new_utsname *a = init_utsname(); + static struct fs_struct fs; + spin_lock_init(&fs.lock); ; return 0; @@ -16729,9 +17001,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16747,7 +17021,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INIT_UTSNAME 1 +#define HAVE_FS_STRUCT_SPINLOCK 1 _ACEOF @@ -16765,10 +17039,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 -$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether kuid_t/kgid_t is available" >&5 +$as_echo_n "checking whether kuid_t/kgid_t is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16779,13 +17054,56 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - return 0; + kuid_t userid = KUIDT_INIT(0); + kgid_t groupid = KGIDT_INIT(0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + kuid_t userid = 0; + kgid_t groupid = 0; ; return 0; @@ -16794,9 +17112,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16808,13 +17128,27 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: yes; optional" >&5 +$as_echo "yes; optional" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: yes; mandatory" >&5 +$as_echo "yes; mandatory" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FDTABLE_HEADER 1 +#define HAVE_KUIDGID_T 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + + + +fi + + rm -Rf build + else @@ -16826,7 +17160,6 @@ $as_echo "no" >&6; } - fi rm -Rf build @@ -16835,8 +17168,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 -$as_echo_n "checking whether files_fdtable() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16847,18 +17180,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - #ifdef HAVE_FDTABLE_HEADER - #include - #endif + #include int main (void) { - struct files_struct *files = current->files; - struct fdtable *fdt = files_fdtable(files); + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -16867,9 +17198,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16885,7 +17218,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FILES_FDTABLE 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -16905,8 +17238,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 -$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 +$as_echo_n "checking whether iops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16917,13 +17250,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - return 0; + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -16932,9 +17268,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16946,14 +17284,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_UACCESS_HEADER 1 +#define HAVE_INODE_FALLOCATE 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else $as_echo "$as_me: failed program was:" >&5 @@ -16964,7 +17301,6 @@ $as_echo "no" >&6; } - fi rm -Rf build @@ -16972,9 +17308,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 -$as_echo_n "checking whether kmalloc_node() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16985,13 +17320,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - void *a = kmalloc_node(1, GFP_KERNEL, 0); + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -17000,9 +17338,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17018,7 +17358,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KMALLOC_NODE 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -17038,49 +17378,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 -$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; } - grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 -$as_echo_n "checking whether struct inode has i_mutex... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_INFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17091,16 +17391,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include + #if !defined(CONFIG_ZLIB_INFLATE) && \ + !defined(CONFIG_ZLIB_INFLATE_MODULE) + #error CONFIG_ZLIB_INFLATE not defined + #endif int main (void) { - struct inode i; - mutex_init(&i.i_mutex); - ; return 0; } @@ -17108,9 +17407,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17125,17 +17426,19 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_I_MUTEX 1 -_ACEOF - - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** This kernel does not include the required zlib inflate support. + *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&5 +$as_echo "$as_me: error: + *** This kernel does not include the required zlib inflate support. + *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&2;} + { (exit 1); exit 1; }; } @@ -17146,8 +17449,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5 -$as_echo_n "checking whether struct mutex has owner... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17158,15 +17461,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #if !defined(CONFIG_ZLIB_DEFLATE) && \ + !defined(CONFIG_ZLIB_DEFLATE_MODULE) + #error CONFIG_ZLIB_DEFLATE not defined + #endif int main (void) { - struct mutex mtx; - mtx.owner = NULL; - ; return 0; } @@ -17174,9 +17477,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17191,17 +17496,19 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_OWNER 1 -_ACEOF - - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** This kernel does not include the required zlib deflate support. + *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&5 +$as_echo "$as_me: error: + *** This kernel does not include the required zlib deflate support. + *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&2;} + { (exit 1); exit 1; }; } @@ -17211,9 +17518,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 -$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5 +$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17224,15 +17530,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct mutex mutex; - mutex_init(&mutex); - mutex_lock_nested(&mutex, 0); + return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL); ; return 0; @@ -17241,9 +17545,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17259,7 +17565,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_MUTEX_LOCK_NESTED 1 +#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1 _ACEOF @@ -17279,8 +17585,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 -$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5 +$as_echo_n "checking whether struct shrink_control exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17291,13 +17597,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - on_each_cpu(NULL, NULL, 0); + struct shrink_control sc __attribute__ ((unused)); + + sc.nr_to_scan = 0; + sc.gfp_mask = GFP_KERNEL; ; return 0; @@ -17306,9 +17615,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17324,7 +17635,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_ON_EACH_CPU 1 +#define HAVE_SHRINK_CONTROL_STRUCT 1 _ACEOF @@ -17344,272 +17655,154 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 -$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; } - grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 -_ACEOF + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5 +$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_KALLSYMS_LOOKUP_NAME 1 +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF - - fi - +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 -$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; } - grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +int +main (void) +{ -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 -_ACEOF + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + raw_spinlock_t dummy_lock __attribute__ ((unused)) = + __RAW_SPIN_LOCK_INITIALIZER(dummy_lock); + dummy_semaphore.wait_lock = dummy_lock; - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_VMALLOC_INFO 1 _ACEOF - fi - + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 -$as_echo_n "checking whether symbol *_pgdat exist... " >&6; } - grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null - rc=$? - if test $rc -eq 0; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_HELPERS 1 +#define RWSEM_SPINLOCK_IS_RAW 1 _ACEOF - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; } - grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_FIRST_ONLINE_PGDAT 1 -_ACEOF + rm -Rf build - fi + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 -$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; } - grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has member activity" >&5 +$as_echo_n "checking whether struct rw_semaphore has member activity... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ONLINE_PGDAT 1 -_ACEOF + #include - fi +int +main (void) +{ + struct rw_semaphore dummy_semaphore __attribute__ ((unused)); + dummy_semaphore.activity = 0; + ; + return 0; +} - { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 -$as_echo_n "checking whether symbol next_zone is exported... " >&6; } - grep -q -E '[[:space:]]next_zone[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +_ACEOF - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 -_ACEOF + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_NEXT_ZONE 1 +#define HAVE_RWSEM_ACTIVITY 1 _ACEOF - fi - +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 -$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; } - grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_PGDAT_LIST 1 -_ACEOF + rm -Rf build - fi + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 -$as_echo_n "checking whether global_page_state() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has atomic_long_t member count" >&5 +$as_echo_n "checking whether struct rw_semaphore has atomic_long_t member count... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -17620,14 +17813,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - unsigned long state; - state = global_page_state(0); + DECLARE_RWSEM(dummy_semaphore); + (void) atomic_long_read(&dummy_semaphore.count); ; return 0; @@ -17636,9 +17829,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17654,7 +17849,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GLOBAL_PAGE_STATE 1 +#define HAVE_RWSEM_ATOMIC_LONG_COUNT 1 _ACEOF @@ -17672,10 +17867,10 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5 -$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether header linux/sched/rt.h exists" >&5 +$as_echo_n "checking whether header linux/sched/rt.h exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17686,14 +17881,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_FREE_PAGES; + return 0; ; return 0; @@ -17702,9 +17897,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17716,13 +17913,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1 +#define HAVE_SCHED_RT_HEADER 1 _ACEOF + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 @@ -17739,9 +17936,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether header linux/sched/signal.h exists" >&5 +$as_echo_n "checking whether header linux/sched/signal.h exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17752,14 +17948,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_INACTIVE; + return 0; ; return 0; @@ -17768,9 +17964,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17782,13 +17980,13 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1 +#define HAVE_SCHED_SIGNAL_HEADER 1 _ACEOF + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 @@ -17805,8 +18003,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 4 args" >&5 +$as_echo_n "checking whether vfs_getattr() wants 4 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17817,14 +18016,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_INACTIVE_ANON; + vfs_getattr((const struct path *)NULL, + (struct kstat *)NULL, + (u32)0, + (unsigned int)0); ; return 0; @@ -17833,9 +18034,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17851,7 +18054,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1 +#define HAVE_4ARGS_VFS_GETATTR 1 _ACEOF @@ -17870,8 +18073,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 3 args" >&5 +$as_echo_n "checking whether vfs_getattr() wants 3 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17882,14 +18086,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_INACTIVE_FILE; + vfs_getattr((struct vfsmount *)NULL, + (struct dentry *)NULL, + (struct kstat *)NULL); ; return 0; @@ -17898,9 +18103,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17916,7 +18123,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1 +#define HAVE_3ARGS_VFS_GETATTR 1 _ACEOF @@ -17936,8 +18143,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 2 args" >&5 +$as_echo_n "checking whether vfs_getattr() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17948,14 +18155,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_ACTIVE; + vfs_getattr((struct path *) NULL, + (struct kstat *)NULL); ; return 0; @@ -17964,9 +18171,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17982,7 +18191,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1 +#define HAVE_2ARGS_VFS_GETATTR 1 _ACEOF @@ -18001,8 +18210,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether usleep_range() is available" >&5 +$as_echo_n "checking whether usleep_range() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18013,14 +18223,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_ACTIVE_ANON; + usleep_range(0, 0); ; return 0; @@ -18029,9 +18238,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18047,7 +18258,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1 +#define HAVE_USLEEP_RANGE 1 _ACEOF @@ -18066,8 +18277,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5 -$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has allocflags" >&5 +$as_echo_n "checking whether struct kmem_cache has allocflags... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18078,14 +18290,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - enum zone_stat_item zsi; - zsi = NR_ACTIVE_FILE; + struct kmem_cache cachep __attribute__ ((unused)); + cachep.allocflags = GFP_KERNEL; ; return 0; @@ -18094,9 +18306,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18112,7 +18326,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1 +#define HAVE_KMEM_CACHE_ALLOCFLAGS 1 _ACEOF @@ -18123,17 +18337,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - - -fi - - rm -Rf build - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5 -$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has gfpflags" >&5 +$as_echo_n "checking whether struct kmem_cache has gfpflags... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18144,26 +18349,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include int main (void) { - #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES) - #error "global_page_state needs NR_FREE_PAGES" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE) - #error "global_page_state needs NR_ACTIVE*" - #endif - - #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \ - !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE) - #error "global_page_state needs NR_INACTIVE*" - #endif + struct kmem_cache cachep __attribute__ ((unused)); + cachep.gfpflags = GFP_KERNEL; ; return 0; @@ -18172,9 +18365,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18186,153 +18381,40 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NEED_GET_ZONE_COUNTS 1 -_ACEOF - - - { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 -$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; } - grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_ZONE_COUNTS 1 +#define HAVE_KMEM_CACHE_GFPFLAGS 1 _ACEOF - fi - - - - -fi - - rm -Rf build - - +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5 -$as_echo_n "checking whether symbol user_path_at is exported... " >&6; } - grep -q -E '[[:space:]]user_path_at[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_USER_PATH_DIR 1 -_ACEOF +fi - fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5 -$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; } - grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF +fi - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + rm -Rf build -cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_FS_PWD 1 -_ACEOF - fi - { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5 -$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether wait_on_bit() takes an action" >&5 +$as_echo_n "checking whether wait_on_bit() takes an action... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18343,14 +18425,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include + #include int main (void) { - set_fs_pwd(NULL, NULL); + int (*action)(void *) = NULL; + wait_on_bit(NULL, 0, action, 0); ; return 0; @@ -18359,9 +18441,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18377,7 +18461,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_SET_FS_PWD 1 +#define HAVE_WAIT_ON_BIT_ACTION 1 _ACEOF @@ -18396,8 +18480,11 @@ fi - { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 -$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether inode_lock_shared() exists" >&5 +$as_echo_n "checking whether inode_lock_shared() exists... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -18414,7 +18501,8 @@ int main (void) { - vfs_unlink(NULL, NULL); + struct inode *inode = NULL; + inode_lock_shared(inode); ; return 0; @@ -18423,9 +18511,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18441,7 +18531,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_VFS_UNLINK 1 +#define HAVE_INODE_LOCK_SHARED 1 _ACEOF @@ -18459,9 +18549,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" + - { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 -$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether group_info->gid exists" >&5 +$as_echo_n "checking whether group_info->gid exists... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -18472,13 +18566,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - vfs_rename(NULL, NULL, NULL, NULL); + struct group_info *gi = groups_alloc(1); + gi->gid[0] = KGIDT_INIT(0); ; return 0; @@ -18487,9 +18582,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18505,7 +18602,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_4ARGS_VFS_RENAME 1 +#define HAVE_GROUP_INFO_GID 1 _ACEOF @@ -18523,10 +18620,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5 -$as_echo_n "checking whether struct cred exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether kmem_cache_create_usercopy() exists" >&5 +$as_echo_n "checking whether kmem_cache_create_usercopy() exists... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -18537,14 +18637,26 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + static void ctor(void *foo) + { + // fake ctor + } int main (void) { - struct cred *cr; - cr = NULL; + struct kmem_cache *skc_linux_cache; + const char *name = "test"; + size_t size = 4096; + size_t align = 8; + unsigned long flags = 0; + size_t useroffset = 0; + size_t usersize = size - useroffset; + + skc_linux_cache = kmem_cache_create_usercopy( + name, size, align, flags, useroffset, usersize, ctor); ; return 0; @@ -18553,9 +18665,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18571,7 +18685,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CRED_STRUCT 1 +#define HAVE_KMEM_CACHE_CREATE_USERCOPY 1 _ACEOF @@ -18589,92 +18703,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5 -$as_echo_n "checking whether symbol groups_search is exported... " >&6; } - grep -q -E '[[:space:]]groups_search[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(groups_search)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GROUPS_SEARCH 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5 -$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; } - grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_TASK_STRUCT 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5 -$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether wait_queue_entry_t exists" >&5 +$as_echo_n "checking whether wait_queue_entry_t exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18685,13 +18718,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - proc_dostring(NULL, 0, NULL, NULL, NULL); + wait_queue_entry_t *entry __attribute__ ((unused)); ; return 0; @@ -18700,9 +18733,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18718,7 +18753,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_5ARGS_PROC_HANDLER 1 +#define HAVE_WAIT_QUEUE_ENTRY_T 1 _ACEOF @@ -18738,49 +18773,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5 -$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; } - grep -q -E '[[:space:]]kvasprintf[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in ; do - grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KVASPRINTF 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5 -$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether wq_head->head and wq_entry->entry exist" >&5 +$as_echo_n "checking whether wq_head->head and wq_entry->entry exist... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18791,13 +18785,27 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + #ifdef HAVE_WAIT_QUEUE_ENTRY_T + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_entry_t spl_wait_queue_entry_t; + #else + typedef wait_queue_head_t spl_wait_queue_head_t; + typedef wait_queue_t spl_wait_queue_entry_t; + #endif int main (void) { - file_fsync(NULL, NULL, 0); + spl_wait_queue_head_t wq_head; + spl_wait_queue_entry_t wq_entry; + struct list_head *head __attribute__ ((unused)); + struct list_head *entry __attribute__ ((unused)); + + head = &wq_head.head; + entry = &wq_entry.entry; ; return 0; @@ -18806,9 +18814,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18824,7 +18834,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_3ARGS_FILE_FSYNC 1 +#define HAVE_WAIT_QUEUE_HEAD_ENTRY 1 _ACEOF @@ -18844,76 +18854,19 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5 -$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; } - grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \ - $LINUX_OBJ/Module*.symvers 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in lib/rwsem-spinlock.c; do - grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \ - "$LINUX_OBJ/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF - - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1 -_ACEOF - - fi - - - - - - if test "x$AWK" != xgawk; then - - { { $as_echo "$as_me:$LINENO: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&5 -$as_echo "$as_me: error: - *** Required util gawk missing. Please install the required - *** gawk package for your distribution and try again." >&2;} - { (exit 1); exit 1; }; } - -fi - - - ;; + ;; srpm) ;; - *) - { $as_echo "$as_me:$LINENO: result: Error!" >&5 + *) + { $as_echo "$as_me:$LINENO: result: Error!" >&5 $as_echo "Error!" >&6; } - { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all|srpm" >&5 + { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, + user kernel|user|all|srpm" >&5 $as_echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, - user kernel|user|all|srpm" >&2;} + user kernel|user|all|srpm" >&2;} { (exit 1); exit 1; }; } ;; - esac + esac - if test "$SPL_CONFIG" = user || - test "$SPL_CONFIG" = all; then + if test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all; then CONFIG_USER_TRUE= CONFIG_USER_FALSE='#' else @@ -18921,8 +18874,8 @@ else CONFIG_USER_FALSE= fi - if test "$SPL_CONFIG" = kernel || - test "$SPL_CONFIG" = all; then + if test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all && + test "x$enable_linux_builtin" != xyes ; then CONFIG_KERNEL_TRUE= CONFIG_KERNEL_FALSE='#' else @@ -18932,7 +18885,7 @@ fi -ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec" +ac_config_files="$ac_config_files Makefile man/Makefile man/man1/Makefile man/man5/Makefile lib/Makefile cmd/Makefile cmd/splat/Makefile cmd/splslab/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile include/fs/Makefile include/linux/Makefile include/rpc/Makefile include/sharefs/Makefile include/sys/Makefile include/sys/fm/Makefile include/sys/fs/Makefile include/sys/sysevent/Makefile include/util/Makefile include/vm/Makefile scripts/Makefile rpm/Makefile rpm/redhat/Makefile rpm/redhat/spl.spec rpm/redhat/spl-kmod.spec rpm/redhat/spl-dkms.spec rpm/generic/Makefile rpm/generic/spl.spec rpm/generic/spl-kmod.spec rpm/generic/spl-dkms.spec spl.release" cat >confcache <<\_ACEOF @@ -19397,7 +19350,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by $as_me, which was +This file was extended by spl $as_me 0.7.2, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19460,7 +19413,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -config.status +spl config.status 0.7.2 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -19842,15 +19795,38 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES man/man1/Makefile" ;; + "man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES man/man5/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; + "cmd/splat/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/splat/Makefile" ;; + "cmd/splslab/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/splslab/Makefile" ;; "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;; "module/spl/Makefile") CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;; "module/splat/Makefile") CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/fs/Makefile" ;; + "include/linux/Makefile") CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;; + "include/rpc/Makefile") CONFIG_FILES="$CONFIG_FILES include/rpc/Makefile" ;; + "include/sharefs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sharefs/Makefile" ;; + "include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;; + "include/sys/fm/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;; + "include/sys/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;; + "include/sys/sysevent/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/sysevent/Makefile" ;; + "include/util/Makefile") CONFIG_FILES="$CONFIG_FILES include/util/Makefile" ;; + "include/vm/Makefile") CONFIG_FILES="$CONFIG_FILES include/vm/Makefile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "spl.spec") CONFIG_FILES="$CONFIG_FILES spl.spec" ;; - "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; + "rpm/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/Makefile" ;; + "rpm/redhat/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/redhat/Makefile" ;; + "rpm/redhat/spl.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/spl.spec" ;; + "rpm/redhat/spl-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/spl-kmod.spec" ;; + "rpm/redhat/spl-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/spl-dkms.spec" ;; + "rpm/generic/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/generic/Makefile" ;; + "rpm/generic/spl.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/spl.spec" ;; + "rpm/generic/spl-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/spl-kmod.spec" ;; + "rpm/generic/spl-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/spl-dkms.spec" ;; + "spl.release") CONFIG_FILES="$CONFIG_FILES spl.release" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}