- echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5
-echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5
+echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_ZONE_COUNTS 1
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/mm.h>
+
+int
+main (void)
+{
+
+ unsigned long state;
+ state = global_page_state(0);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- fi
- else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_ZONE_COUNTS 1
+#define HAVE_GLOBAL_PAGE_STATE 1
_ACEOF
- fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
- echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5
-echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6
+
+ echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5
+echo $ECHO_N "checking whether page state NR_FREE_PAGES is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/vmstat.h>
+ #include <linux/mm.h>
int
main (void)
{
- unsigned long state;
- state = global_page_state(NR_FREE_PAGES);
+ enum zone_stat_item zsi;
+ zsi = NR_FREE_PAGES;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_PAGE_STATE 1
+#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1
_ACEOF
- echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5
-echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5
+echo $ECHO_N "checking whether page state NR_INACTIVE is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/mmzone.h>
+ #include <linux/mm.h>
int
main (void)
{
- enum zone_stat_item i1, i2, i3;
- i1 = NR_FREE_PAGES;
- i2 = NR_INACTIVE;
- i3 = NR_ACTIVE;
+ enum zone_stat_item zsi;
+ zsi = NR_INACTIVE;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_FIA 1
+#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1
_ACEOF
- echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5
-echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5
+echo $ECHO_N "checking whether page state NR_INACTIVE_ANON is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/mm.h>
int
main (void)
{
- vfs_unlink(NULL, NULL);
+ enum zone_stat_item zsi;
+ zsi = NR_INACTIVE_ANON;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_VFS_UNLINK 1
+#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1
_ACEOF
- echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5
-echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5
+echo $ECHO_N "checking whether page state NR_INACTIVE_FILE is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/mm.h>
int
main (void)
{
- vfs_rename(NULL, NULL, NULL, NULL);
+ enum zone_stat_item zsi;
+ zsi = NR_INACTIVE_FILE;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_4ARGS_VFS_RENAME 1
+#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1
_ACEOF
- echo "$as_me:$LINENO: checking whether struct cred exists" >&5
-echo $ECHO_N "checking whether struct cred exists... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5
+echo $ECHO_N "checking whether page state NR_ACTIVE is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/cred.h>
+ #include <linux/mm.h>
int
main (void)
{
- struct cred *cr;
- cr = NULL;
+ enum zone_stat_item zsi;
+ zsi = NR_ACTIVE;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_CRED_STRUCT 1
+#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1
_ACEOF
+ echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5
+echo $ECHO_N "checking whether page state NR_ACTIVE_ANON is available... $ECHO_C" >&6
- echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5
-echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/mm.h>
+
+int
+main (void)
+{
+
+ enum zone_stat_item zsi;
+ zsi = NR_ACTIVE_ANON;
+
+ ;
+ return 0;
+}
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GROUPS_SEARCH 1
_ACEOF
- fi
- else
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GROUPS_SEARCH 1
+#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1
_ACEOF
- fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- ;;
- user) ;;
- all)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
-# Check whether --with-linux or --without-linux was given.
-if test "${with_linux+set}" = set; then
- withval="$with_linux"
- kernelsrc="$withval"
-fi;
+fi
-# Check whether --with-linux-obj or --without-linux-obj was given.
-if test "${with_linux_obj+set}" = set; then
- withval="$with_linux_obj"
- kernelbuild="$withval"
-fi;
+ rm -Rf build
- echo "$as_me:$LINENO: checking kernel source directory" >&5
-echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6
- if test -z "$kernelsrc"; then
- sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \
- 2>/dev/null | grep -v obj | tail -1`
- if test -e ${sourcelink}; then
- kernelsrc=`readlink -f ${sourcelink}`
- else
- echo "$as_me:$LINENO: result: Not found" >&5
-echo "${ECHO_T}Not found" >&6
- { { echo "$as_me:$LINENO: error:
- *** Please specify the location of the kernel source
- *** with the '--with-linux=PATH' option" >&5
-echo "$as_me: error:
- *** Please specify the location of the kernel source
- *** with the '--with-linux=PATH' option" >&2;}
- { (exit 1); exit 1; }; }
- fi
- else
- if test "$kernelsrc" = "NONE"; then
- kernsrcver=NONE
- fi
- fi
- echo "$as_me:$LINENO: result: $kernelsrc" >&5
-echo "${ECHO_T}$kernelsrc" >&6
- echo "$as_me:$LINENO: checking kernel build directory" >&5
-echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6
- if test -z "$kernelbuild"; then
- if test -d ${kernelsrc}-obj/`arch`/`arch`; then
- kernelbuild=${kernelsrc}-obj/`arch`/`arch`
- elif test -d ${kernelsrc}-obj/`arch`/default; then
- kernelbuild=${kernelsrc}-obj/`arch`/default
- elif test -d `dirname ${kernelsrc}`/build-`arch`; then
- kernelbuild=`dirname ${kernelsrc}`/build-`arch`
- else
- kernelbuild=${kernelsrc}
- fi
- fi
- echo "$as_me:$LINENO: result: $kernelbuild" >&5
-echo "${ECHO_T}$kernelbuild" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5
+echo $ECHO_N "checking whether page state NR_ACTIVE_FILE is available... $ECHO_C" >&6
- echo "$as_me:$LINENO: checking kernel source version" >&5
-echo $ECHO_N "checking kernel source version... $ECHO_C" >&6
- if test -r $kernelbuild/include/linux/version.h &&
- fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then
- kernsrcver=`(echo "#include <linux/version.h>";
- echo "kernsrcver=UTS_RELEASE") |
- cpp -I $kernelbuild/include |
- grep "^kernsrcver=" | cut -d \" -f 2`
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- elif test -r $kernelbuild/include/linux/utsrelease.h &&
- fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then
- kernsrcver=`(echo "#include <linux/utsrelease.h>";
- echo "kernsrcver=UTS_RELEASE") |
- cpp -I $kernelbuild/include |
- grep "^kernsrcver=" | cut -d \" -f 2`
- fi
+ #include <linux/mm.h>
- if test -z "$kernsrcver"; then
- echo "$as_me:$LINENO: result: Not found" >&5
-echo "${ECHO_T}Not found" >&6
- { { echo "$as_me:$LINENO: error:
- *** Cannot determine the version of the linux kernel source.
- *** Please prepare the kernel before running this script" >&5
-echo "$as_me: error:
- *** Cannot determine the version of the linux kernel source.
- *** Please prepare the kernel before running this script" >&2;}
+int
+main (void)
+{
+
+ enum zone_stat_item zsi;
+ zsi = NR_ACTIVE_FILE;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+
+ echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5
+echo $ECHO_N "checking whether symbol get_zone_counts is needed... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+
+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
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_GET_ZONE_COUNTS 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5
+echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_ZONE_COUNTS 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_ZONE_COUNTS 1
+_ACEOF
+
+ fi
+
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+ echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5
+echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ vfs_unlink(NULL, NULL);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_VFS_UNLINK 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+ echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5
+echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ vfs_rename(NULL, NULL, NULL, NULL);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_4ARGS_VFS_RENAME 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+
+ echo "$as_me:$LINENO: checking whether struct cred exists" >&5
+echo $ECHO_N "checking whether struct cred exists... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/cred.h>
+
+int
+main (void)
+{
+
+ struct cred *cr;
+ cr = NULL;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRED_STRUCT 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+
+ echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5
+echo $ECHO_N "checking whether symbol groups_search is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GROUPS_SEARCH 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GROUPS_SEARCH 1
+_ACEOF
+
+ fi
+
+
+ ;;
+ user) ;;
+ all)
+
+
+# Check whether --with-linux or --without-linux was given.
+if test "${with_linux+set}" = set; then
+ withval="$with_linux"
+ kernelsrc="$withval"
+fi;
+
+
+# Check whether --with-linux-obj or --without-linux-obj was given.
+if test "${with_linux_obj+set}" = set; then
+ withval="$with_linux_obj"
+ kernelbuild="$withval"
+fi;
+
+ echo "$as_me:$LINENO: checking kernel source directory" >&5
+echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6
+ if test -z "$kernelsrc"; then
+ sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \
+ 2>/dev/null | grep -v obj | tail -1`
+
+ if test -e ${sourcelink}; then
+ kernelsrc=`readlink -f ${sourcelink}`
+ else
+ echo "$as_me:$LINENO: result: Not found" >&5
+echo "${ECHO_T}Not found" >&6
+ { { echo "$as_me:$LINENO: error:
+ *** Please specify the location of the kernel source
+ *** with the '--with-linux=PATH' option" >&5
+echo "$as_me: error:
+ *** Please specify the location of the kernel source
+ *** with the '--with-linux=PATH' option" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ if test "$kernelsrc" = "NONE"; then
+ kernsrcver=NONE
+ fi
+ fi
+
+ echo "$as_me:$LINENO: result: $kernelsrc" >&5
+echo "${ECHO_T}$kernelsrc" >&6
+ echo "$as_me:$LINENO: checking kernel build directory" >&5
+echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6
+ if test -z "$kernelbuild"; then
+ if test -d ${kernelsrc}-obj/`arch`/`arch`; then
+ kernelbuild=${kernelsrc}-obj/`arch`/`arch`
+ elif test -d ${kernelsrc}-obj/`arch`/default; then
+ kernelbuild=${kernelsrc}-obj/`arch`/default
+ elif test -d `dirname ${kernelsrc}`/build-`arch`; then
+ kernelbuild=`dirname ${kernelsrc}`/build-`arch`
+ else
+ kernelbuild=${kernelsrc}
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $kernelbuild" >&5
+echo "${ECHO_T}$kernelbuild" >&6
+
+ echo "$as_me:$LINENO: checking kernel source version" >&5
+echo $ECHO_N "checking kernel source version... $ECHO_C" >&6
+ if test -r $kernelbuild/include/linux/version.h &&
+ fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then
+
+ kernsrcver=`(echo "#include <linux/version.h>";
+ echo "kernsrcver=UTS_RELEASE") |
+ cpp -I $kernelbuild/include |
+ grep "^kernsrcver=" | cut -d \" -f 2`
+
+ elif test -r $kernelbuild/include/linux/utsrelease.h &&
+ fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then
+
+ kernsrcver=`(echo "#include <linux/utsrelease.h>";
+ echo "kernsrcver=UTS_RELEASE") |
+ cpp -I $kernelbuild/include |
+ grep "^kernsrcver=" | cut -d \" -f 2`
+ fi
+
+ if test -z "$kernsrcver"; then
+ echo "$as_me:$LINENO: result: Not found" >&5
+echo "${ECHO_T}Not found" >&6
+ { { echo "$as_me:$LINENO: error:
+ *** Cannot determine the version of the linux kernel source.
+ *** Please prepare the kernel before running this script" >&5
+echo "$as_me: error:
+ *** Cannot determine the version of the linux kernel source.
+ *** Please prepare the kernel before running this script" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1
+_ACEOF
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5
+echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/time.h>
+ void set_normalized_timespec(struct timespec *ts,
+ time_t sec, long nsec) { }
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1
+_ACEOF
+
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+
+ echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5
+echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/time.h>
+
+int
+main (void)
+{
+
+ struct timespec a, b, c = { 0 };
+ c = timespec_sub(a, b);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIMESPEC_SUB 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+
+ echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5
+echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/utsname.h>
+
+int
+main (void)
+{
+
+ struct new_utsname *a = init_utsname();
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INIT_UTSNAME 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
+
+
+
+
+ echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5
+echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/fdtable.h>
+
+int
+main (void)
+{
+
+ return 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1
+#define HAVE_FDTABLE_HEADER 1
_ACEOF
- fi
- else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1
-_ACEOF
- fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
- echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5
-echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6
+
+fi
+
+ rm -Rf build
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5
+echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/time.h>
- void set_normalized_timespec(struct timespec *ts,
- time_t sec, long nsec) { }
+ #include <linux/sched.h>
+ #include <linux/file.h>
+ #ifdef HAVE_FDTABLE_HEADER
+ #include <linux/fdtable.h>
+ #endif
int
main (void)
{
+ struct files_struct *files = current->files;
+ struct fdtable *fdt = files_fdtable(files);
+
;
return 0;
}
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1
+#define HAVE_FILES_FDTABLE 1
_ACEOF
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
fi
- echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5
-echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5
+echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/time.h>
+ #include <linux/uaccess.h>
int
main (void)
{
- struct timespec a, b, c = { 0 };
- c = timespec_sub(a, b);
+ return 0;
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIMESPEC_SUB 1
+#define HAVE_UACCESS_HEADER 1
_ACEOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
else
echo "$as_me: failed program was:" >&5
+
fi
rm -Rf build
- echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5
-echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6
+
+ echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5
+echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/utsname.h>
+ #include <linux/slab.h>
int
main (void)
{
- struct new_utsname *a = init_utsname();
+ void *a = kmalloc_node(1, GFP_KERNEL, 0);
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_INIT_UTSNAME 1
+#define HAVE_KMALLOC_NODE 1
_ACEOF
- echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5
-echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5
+echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MONOTONIC_CLOCK 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MONOTONIC_CLOCK 1
+_ACEOF
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5
+echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/fdtable.h>
+ #include <linux/fs.h>
+ #include <linux/mutex.h>
int
main (void)
{
- return 0;
+ struct inode i;
+ mutex_init(&i.i_mutex);
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FDTABLE_HEADER 1
+#define HAVE_INODE_I_MUTEX 1
_ACEOF
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
else
echo "$as_me: failed program was:" >&5
-
fi
rm -Rf build
-
- echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5
-echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5
+echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/sched.h>
- #include <linux/file.h>
- #ifdef HAVE_FDTABLE_HEADER
- #include <linux/fdtable.h>
- #endif
+ #include <linux/mutex.h>
int
main (void)
{
- struct files_struct *files = current->files;
- struct fdtable *fdt = files_fdtable(files);
+ struct mutex mutex;
+ mutex_init(&mutex);
+ mutex_lock_nested(&mutex, 0);
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILES_FDTABLE 1
+#define HAVE_MUTEX_LOCK_NESTED 1
_ACEOF
- echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5
-echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5
+echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6
+ grep -q -E '[[:space:]]div64_64[[: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.*(div64_64)" \
+ "$LINUX_OBJ/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+ fi
+ done
+ if test $export -eq 0; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIV64_64 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIV64_64 1
+_ACEOF
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5
+echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6
+ grep -q -E '[[:space:]]div64_u64[[: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.*(div64_u64)" \
+ "$LINUX_OBJ/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+ fi
+ done
+ if test $export -eq 0; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIV64_U64 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIV64_U64 1
+_ACEOF
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5
+echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/uaccess.h>
+ #include <linux/smp.h>
int
main (void)
{
- return 0;
+ on_each_cpu(NULL, NULL, 0);
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_UACCESS_HEADER 1
+#define HAVE_3ARGS_ON_EACH_CPU 1
_ACEOF
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
else
echo "$as_me: failed program was:" >&5
-
fi
rm -Rf build
+ echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5
+echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
- echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5
-echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KALLSYMS_LOOKUP_NAME 1
+_ACEOF
-cat >conftest.c <<_ACEOF
-/* confdefs.h. */
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KALLSYMS_LOOKUP_NAME 1
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+ fi
- #include <linux/slab.h>
-int
-main (void)
-{
- void *a = kmalloc_node(1, GFP_KERNEL, 0);
+ echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5
+echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
- ;
- return 0;
-}
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_VMALLOC_INFO 1
_ACEOF
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_VMALLOC_INFO 1
+_ACEOF
+
+ fi
+
- rm -Rf build && mkdir -p build
- 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'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- 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=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5
+echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6
+ grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_KMALLOC_NODE 1
+#define HAVE_PGDAT_HELPERS 1
_ACEOF
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- echo "$as_me:$LINENO: result: no" >&5
+ echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5
+echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FIRST_ONLINE_PGDAT 1
+_ACEOF
-fi
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
- rm -Rf build
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FIRST_ONLINE_PGDAT 1
+_ACEOF
+ fi
- echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5
-echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6
- grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \
+ echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5
+echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&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.*(monotonic_clock)" \
+ grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \
"$LINUX_OBJ/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_MONOTONIC_CLOCK 1
+#define HAVE_NEXT_ONLINE_PGDAT 1
_ACEOF
fi
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_MONOTONIC_CLOCK 1
+#define HAVE_NEXT_ONLINE_PGDAT 1
_ACEOF
fi
- echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5
-echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5
+echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NEXT_ZONE 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NEXT_ZONE 1
+_ACEOF
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5
+echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PGDAT_LIST 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PGDAT_LIST 1
+_ACEOF
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5
+echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/fs.h>
- #include <linux/mutex.h>
+ #include <linux/mm.h>
int
main (void)
{
- struct inode i;
- mutex_init(&i.i_mutex);
+ unsigned long state;
+ state = global_page_state(0);
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_I_MUTEX 1
+#define HAVE_GLOBAL_PAGE_STATE 1
_ACEOF
- echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5
-echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5
+echo $ECHO_N "checking whether page state NR_FREE_PAGES is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/mutex.h>
+ #include <linux/mm.h>
int
main (void)
{
- struct mutex mutex;
- mutex_init(&mutex);
- mutex_lock_nested(&mutex, 0);
+ enum zone_stat_item zsi;
+ zsi = NR_FREE_PAGES;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_MUTEX_LOCK_NESTED 1
+#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1
_ACEOF
- echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5
-echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6
- grep -q -E '[[:space:]]div64_64[[: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.*(div64_64)" \
- "$LINUX_OBJ/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
- export=1
- break;
- fi
- done
- if test $export -eq 0; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5
+echo $ECHO_N "checking whether page state NR_INACTIVE is available... $ECHO_C" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIV64_64 1
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- fi
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIV64_64 1
-_ACEOF
+ #include <linux/mm.h>
- fi
+int
+main (void)
+{
+ enum zone_stat_item zsi;
+ zsi = NR_INACTIVE;
+ ;
+ return 0;
+}
- echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5
-echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6
- grep -q -E '[[:space:]]div64_u64[[: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.*(div64_u64)" \
- "$LINUX_OBJ/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
- export=1
- break;
- fi
- done
- if test $export -eq 0; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+_ACEOF
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIV64_U64 1
-_ACEOF
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- fi
- else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIV64_U64 1
+#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1
_ACEOF
- fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+
+
+fi
+
+ rm -Rf build
- echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5
-echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6
+
+ echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5
+echo $ECHO_N "checking whether page state NR_INACTIVE_ANON is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/smp.h>
+ #include <linux/mm.h>
int
main (void)
{
- on_each_cpu(NULL, NULL, 0);
+ enum zone_stat_item zsi;
+ zsi = NR_INACTIVE_ANON;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARGS_ON_EACH_CPU 1
+#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1
_ACEOF
+ echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5
+echo $ECHO_N "checking whether page state NR_INACTIVE_FILE is available... $ECHO_C" >&6
- echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5
-echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KALLSYMS_LOOKUP_NAME 1
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- fi
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KALLSYMS_LOOKUP_NAME 1
-_ACEOF
+ #include <linux/mm.h>
- fi
+int
+main (void)
+{
+ enum zone_stat_item zsi;
+ zsi = NR_INACTIVE_FILE;
+ ;
+ return 0;
+}
- echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5
-echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+_ACEOF
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_VMALLOC_INFO 1
-_ACEOF
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- fi
- else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_VMALLOC_INFO 1
+#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1
_ACEOF
- fi
-
-
-
- echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5
-echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6
- grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_HELPERS 1
-_ACEOF
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- fi
- echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5
-echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+fi
+
+ rm -Rf build
+
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FIRST_ONLINE_PGDAT 1
-_ACEOF
- fi
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FIRST_ONLINE_PGDAT 1
+ echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5
+echo $ECHO_N "checking whether page state NR_ACTIVE is available... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- fi
+ #include <linux/mm.h>
+int
+main (void)
+{
- echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5
-echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ enum zone_stat_item zsi;
+ zsi = NR_ACTIVE;
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ ;
+ return 0;
+}
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ONLINE_PGDAT 1
_ACEOF
- fi
- else
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ONLINE_PGDAT 1
+#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1
_ACEOF
- fi
-
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5
-echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ZONE 1
-_ACEOF
- fi
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+fi
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ZONE 1
+ rm -Rf build
+
+
+
+ echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5
+echo $ECHO_N "checking whether page state NR_ACTIVE_ANON is available... $ECHO_C" >&6
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- fi
+ #include <linux/mm.h>
+int
+main (void)
+{
- echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5
-echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ enum zone_stat_item zsi;
+ zsi = NR_ACTIVE_ANON;
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ ;
+ return 0;
+}
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_LIST 1
_ACEOF
- fi
- else
+
+ rm -Rf build && mkdir -p build
+ 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'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ 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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_LIST 1
+#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1
_ACEOF
- fi
-
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5
-echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_ZONE_COUNTS 1
-_ACEOF
- fi
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_ZONE_COUNTS 1
-_ACEOF
+fi
- fi
+ rm -Rf build
- echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5
-echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5
+echo $ECHO_N "checking whether page state NR_ACTIVE_FILE is available... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/vmstat.h>
+ #include <linux/mm.h>
int
main (void)
{
- unsigned long state;
- state = global_page_state(NR_FREE_PAGES);
+ enum zone_stat_item zsi;
+ zsi = NR_ACTIVE_FILE;
;
return 0;
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_PAGE_STATE 1
+#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1
_ACEOF
- echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5
-echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5
+echo $ECHO_N "checking whether symbol get_zone_counts is needed... $ECHO_C" >&6
cat >conftest.c <<_ACEOF
/* end confdefs.h. */
- #include <linux/mmzone.h>
int
main (void)
{
- enum zone_stat_item i1, i2, i3;
- i1 = NR_FREE_PAGES;
- i2 = NR_INACTIVE;
- i3 = NR_ACTIVE;
+ #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
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_FIA 1
+#define NEED_GET_ZONE_COUNTS 1
_ACEOF
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- echo "$as_me:$LINENO: result: no" >&5
+ echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5
+echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_ZONE_COUNTS 1
+_ACEOF
+
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_ZONE_COUNTS 1
+_ACEOF
+
+ fi
+
+
fi