From ff0582cb395a8fd9be61926023a3923b9a908cc2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 1 Oct 2014 16:31:11 -0400 Subject: [PATCH] Remove atomic64_xchg() wrappers The atomic64_xchg() and atomic64_cmpxchg() functions have been available since Linux 2.6.24. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf --- config/spl-build.m4 | 40 ---------------------------------------- include/sys/atomic.h | 8 -------- 2 files changed, 48 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 109c653c1..2a3d278de 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -23,8 +23,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_DEBUG_KMEM_TRACKING SPL_AC_TEST_MODULE SPL_AC_ATOMIC_SPINLOCK - SPL_AC_TYPE_ATOMIC64_CMPXCHG - SPL_AC_TYPE_ATOMIC64_XCHG SPL_AC_TYPE_UINTPTR_T SPL_AC_SHRINKER_CALLBACK SPL_AC_CTL_NAME @@ -808,44 +806,6 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ AC_MSG_RESULT([$have_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 - ],[ - 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 - ],[ - 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.24 API change, dnl # check if uintptr_t typedef is defined diff --git a/include/sys/atomic.h b/include/sys/atomic.h index e034f2e2c..07b460ef7 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -29,14 +29,6 @@ #include #include -#ifndef HAVE_ATOMIC64_CMPXCHG -#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -#endif - -#ifndef HAVE_ATOMIC64_XCHG -#define atomic64_xchg(v, n) (xchg(&((v)->counter), n)) -#endif - /* * Two approaches to atomic operations are implemented each with its * own benefits are drawbacks imposed by the Solaris API. Neither