mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
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.
This commit is contained in:
+42
-15
@@ -706,22 +706,29 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.14 API change,
|
||||
dnl # check whether 'div64_64()' is available
|
||||
dnl #
|
||||
dnl # 2.6.22 API change,
|
||||
dnl # First introduced 'div64_64()' in lib/div64.c
|
||||
dnl
|
||||
AC_DEFUN([SPL_AC_DIV64_64], [
|
||||
AC_MSG_CHECKING([whether div64_64() is available])
|
||||
SPL_LINUX_TRY_COMPILE([
|
||||
#include <asm/div64.h>
|
||||
#include <linux/types.h>
|
||||
],[
|
||||
uint64_t i = div64_64(1ULL, 1ULL);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_DIV64_64, 1, [div64_64() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
SPL_CHECK_SYMBOL_EXPORT(
|
||||
[div64_64],
|
||||
[],
|
||||
[AC_DEFINE(HAVE_DIV64_64, 1,
|
||||
[div64_64() is available])],
|
||||
[])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.26 API change,
|
||||
dnl # Renamed 'div64_64()' to 'div64_u64' in lib/div64.c
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_DIV64_U64], [
|
||||
SPL_CHECK_SYMBOL_EXPORT(
|
||||
[div64_u64],
|
||||
[],
|
||||
[AC_DEFINE(HAVE_DIV64_U64, 1,
|
||||
[div64_u64() is available])],
|
||||
[])
|
||||
])
|
||||
|
||||
dnl #
|
||||
@@ -836,6 +843,26 @@ AC_DEFUN([SPL_AC_GET_ZONE_COUNTS], [
|
||||
[])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.18 API change,
|
||||
dnl # First introduced global_page_state() support as an inline.
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_GLOBAL_PAGE_STATE], [
|
||||
AC_MSG_CHECKING([whether global_page_state() is available])
|
||||
SPL_LINUX_TRY_COMPILE([
|
||||
#include <linux/vmstat.h>
|
||||
],[
|
||||
unsigned long state;
|
||||
state = global_page_state(NR_FREE_PAGES);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GLOBAL_PAGE_STATE, 1,
|
||||
[global_page_state() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.21 API change,
|
||||
dnl # Public global zone stats now include free/inactive/active page
|
||||
|
||||
Reference in New Issue
Block a user