aboutsummaryrefslogtreecommitdiffstats
path: root/config/spl-build.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/spl-build.m4')
-rw-r--r--config/spl-build.m440
1 files changed, 40 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index 15d10841b..9d81ccc8e 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -28,6 +28,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_ATOMIC_SPINLOCK
SPL_AC_TYPE_UINTPTR_T
SPL_AC_TYPE_ATOMIC64_T
+ SPL_AC_TYPE_ATOMIC64_CMPXCHG
+ SPL_AC_TYPE_ATOMIC64_XCHG
SPL_AC_3ARGS_INIT_WORK
SPL_AC_2ARGS_REGISTER_SYSCTL
SPL_AC_SET_SHRINKER
@@ -489,6 +491,44 @@ AC_DEFUN([SPL_AC_TYPE_ATOMIC64_T],
])
dnl #
+dnl # 2.6.24 API change,
+dnl # check if atomic64_cmpxchg is defined
+dnl #
+AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG],
+ [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg])
+ SPL_LINUX_TRY_COMPILE([
+ #include <asm/atomic.h>
+ ],[
+ atomic64_cmpxchg((atomic64_t *)NULL, 0, 0);
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_ATOMIC64_CMPXCHG, 1,
+ [kernel defines atomic64_cmpxchg])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
+
+dnl #
+dnl # 2.6.24 API change,
+dnl # check if atomic64_xchg is defined
+dnl #
+AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG],
+ [AC_MSG_CHECKING([whether kernel defines atomic64_xchg])
+ SPL_LINUX_TRY_COMPILE([
+ #include <asm/atomic.h>
+ ],[
+ atomic64_xchg((atomic64_t *)NULL, 0);
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_ATOMIC64_XCHG, 1,
+ [kernel defines atomic64_xchg])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
+
+dnl #
dnl # 2.6.20 API change,
dnl # INIT_WORK use 2 args and not store data inside
dnl #