summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-05-20 10:08:37 -0700
committerBrian Behlendorf <[email protected]>2009-05-20 10:08:37 -0700
commit96dded38442684319305082aa2ac7e25f7f414da (patch)
treea541f01e4f60b05adb9931088c2080f659003786 /configure
parentbf338d8d09b410884be526ed4f11b6030244dbfa (diff)
SLES10 Fixes (part 2):
- Configure check, the div64_64() function was renamed to div64_u64() as of 2.6.26. - Configure check, the global_page_state() fuction was introduced in 2.6.18 kernels. The earlier 2.6.16 based SLES10 must not try and use it, thankfully get_zone_counts() is still available. - To simplify debugging poison all symbols aquired dynamically using spl_kallsyms_lookup_name() with SYMBOL_POISON. - Add console messages when the user mode helpers fail. - spl_kmem_init_globals() use bit shifts instead of division. - When the monotonic clock is unavailable __gethrtime() must perform the HZ division as an 'unsigned long long' because the SPL only implements __udivdi3(), and not __divdi3() for 'long long' division on 32-bit arches.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure166
1 files changed, 122 insertions, 44 deletions
diff --git a/configure b/configure
index f6f164dca..96d9d886f 100755
--- a/configure
+++ b/configure
@@ -20510,48 +20510,34 @@ fi
- echo "$as_me:$LINENO: checking whether div64_64() is available" >&5
-echo $ECHO_N "checking whether div64_64() 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 <asm/div64.h>
- #include <linux/types.h>
-
-int
-main (void)
-{
-
- uint64_t i = div64_64(1ULL, 1ULL);
+ 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
- ;
- return 0;
-}
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIV64_64 1
_ACEOF
-
- rm -Rf build && mkdir -p build
- echo "obj-m := conftest.o" >build/Makefile
- if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -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
@@ -20559,20 +20545,46 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_DIV64_64 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 "$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
+ fi
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
- rm -Rf build
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIV64_U64 1
+_ACEOF
+ fi
@@ -20875,6 +20887,72 @@ _ACEOF
+ 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/vmstat.h>
+
+int
+main (void)
+{
+
+ unsigned long state;
+ state = global_page_state(NR_FREE_PAGES);
+
+ ;
+ 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 LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -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_GLOBAL_PAGE_STATE 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 free/inactive/active page state is available" >&5
echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6