mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-02-07 07:43:21 +03:00
config: remove HAVE_KTIME_GET_RAW_TS64
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
e2fcc6ad9e
commit
706fbd4cd6
@ -1,30 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.18: ktime_get_raw_ts64() replaces getrawmonotonic64().
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64], [
|
|
||||||
ZFS_LINUX_TEST_SRC([ktime_get_raw_ts64], [
|
|
||||||
#include <linux/mm.h>
|
|
||||||
], [
|
|
||||||
struct timespec64 ts;
|
|
||||||
ktime_get_raw_ts64(&ts);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_RAW_TS64], [
|
|
||||||
AC_MSG_CHECKING([whether ktime_get_raw_ts64() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([ktime_get_raw_ts64], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KTIME_GET_RAW_TS64, 1,
|
|
||||||
[ktime_get_raw_ts64() exists])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME], [
|
|
||||||
ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KTIME], [
|
|
||||||
ZFS_AC_KERNEL_KTIME_GET_RAW_TS64
|
|
||||||
])
|
|
@ -104,7 +104,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_KUID_HELPERS
|
ZFS_AC_KERNEL_SRC_KUID_HELPERS
|
||||||
ZFS_AC_KERNEL_SRC_RENAME
|
ZFS_AC_KERNEL_SRC_RENAME
|
||||||
ZFS_AC_KERNEL_SRC_USERNS_CAPABILITIES
|
ZFS_AC_KERNEL_SRC_USERNS_CAPABILITIES
|
||||||
ZFS_AC_KERNEL_SRC_KTIME
|
|
||||||
ZFS_AC_KERNEL_SRC_TOTALRAM_PAGES_FUNC
|
ZFS_AC_KERNEL_SRC_TOTALRAM_PAGES_FUNC
|
||||||
ZFS_AC_KERNEL_SRC_TOTALHIGH_PAGES
|
ZFS_AC_KERNEL_SRC_TOTALHIGH_PAGES
|
||||||
ZFS_AC_KERNEL_SRC_PERCPU
|
ZFS_AC_KERNEL_SRC_PERCPU
|
||||||
@ -221,7 +220,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_KUID_HELPERS
|
ZFS_AC_KERNEL_KUID_HELPERS
|
||||||
ZFS_AC_KERNEL_RENAME
|
ZFS_AC_KERNEL_RENAME
|
||||||
ZFS_AC_KERNEL_USERNS_CAPABILITIES
|
ZFS_AC_KERNEL_USERNS_CAPABILITIES
|
||||||
ZFS_AC_KERNEL_KTIME
|
|
||||||
ZFS_AC_KERNEL_TOTALRAM_PAGES_FUNC
|
ZFS_AC_KERNEL_TOTALRAM_PAGES_FUNC
|
||||||
ZFS_AC_KERNEL_TOTALHIGH_PAGES
|
ZFS_AC_KERNEL_TOTALHIGH_PAGES
|
||||||
ZFS_AC_KERNEL_PERCPU
|
ZFS_AC_KERNEL_PERCPU
|
||||||
|
@ -81,13 +81,8 @@ gethrestime_sec(void)
|
|||||||
static inline hrtime_t
|
static inline hrtime_t
|
||||||
gethrtime(void)
|
gethrtime(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_KTIME_GET_RAW_TS64)
|
|
||||||
struct timespec64 ts;
|
struct timespec64 ts;
|
||||||
ktime_get_raw_ts64(&ts);
|
ktime_get_raw_ts64(&ts);
|
||||||
#else
|
|
||||||
struct timespec ts;
|
|
||||||
getrawmonotonic(&ts);
|
|
||||||
#endif
|
|
||||||
return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
|
return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user