Map highbit64() to fls64()

The fls64() function has been available since Linux 2.6.16 and
it should be used to implemented highbit64().  This allows us
to provide an optimized implementation and simplify the code.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2014-09-30 18:07:07 -04:00
parent 9c91800d19
commit 87f8055a91
5 changed files with 3 additions and 97 deletions
-19
View File
@@ -30,7 +30,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_CTL_NAME
SPL_AC_VMALLOC_INFO
SPL_AC_PDE_DATA
SPL_AC_FLS64
SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT
SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE
SPL_AC_TIMESPEC_SUB
@@ -993,24 +992,6 @@ AC_DEFUN([SPL_AC_CTL_NAME], [
])
])
dnl #
dnl # 2.6.16 API change.
dnl # Check if 'fls64()' is available
dnl #
AC_DEFUN([SPL_AC_FLS64],
[AC_MSG_CHECKING([whether fls64() is available])
SPL_LINUX_TRY_COMPILE([
#include <linux/bitops.h>
],[
return fls64(0);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FLS64, 1, [fls64() is available])
],[
AC_MSG_RESULT(no)
])
])
dnl #
dnl # 2.6.26 API change, set_normalized_timespec() is exported.
dnl #