From e2fcc6ad9e8b1a807a7342c7fd80025e7d365854 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 24 Aug 2024 20:54:29 +1000 Subject: [PATCH] config: remove HAVE_KTIME_GET_COARSE_REAL_TS64 Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/kernel-ktime.m4 | 25 ------------------------- include/os/linux/spl/sys/time.h | 8 -------- 2 files changed, 33 deletions(-) diff --git a/config/kernel-ktime.m4 b/config/kernel-ktime.m4 index 64c3b5f90..ba9cf14a2 100644 --- a/config/kernel-ktime.m4 +++ b/config/kernel-ktime.m4 @@ -1,26 +1,3 @@ -dnl # -dnl # 4.18: ktime_get_coarse_real_ts64() replaces current_kernel_time64(). -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64], [ - ZFS_LINUX_TEST_SRC([ktime_get_coarse_real_ts64], [ - #include - ], [ - struct timespec64 ts; - ktime_get_coarse_real_ts64(&ts); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64], [ - AC_MSG_CHECKING([whether ktime_get_coarse_real_ts64() exists]) - ZFS_LINUX_TEST_RESULT([ktime_get_coarse_real_ts64], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KTIME_GET_COARSE_REAL_TS64, 1, - [ktime_get_coarse_real_ts64() exists]) - ], [ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 4.18: ktime_get_raw_ts64() replaces getrawmonotonic64(). dnl # @@ -45,11 +22,9 @@ AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_RAW_TS64], [ ]) AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME], [ - ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64 ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64 ]) AC_DEFUN([ZFS_AC_KERNEL_KTIME], [ - ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64 ZFS_AC_KERNEL_KTIME_GET_RAW_TS64 ]) diff --git a/include/os/linux/spl/sys/time.h b/include/os/linux/spl/sys/time.h index 2b3363c1c..f76903705 100644 --- a/include/os/linux/spl/sys/time.h +++ b/include/os/linux/spl/sys/time.h @@ -67,22 +67,14 @@ typedef struct timespec64 inode_timespec_t; static inline void gethrestime(inode_timespec_t *ts) { -#if defined(HAVE_KTIME_GET_COARSE_REAL_TS64) ktime_get_coarse_real_ts64(ts); -#else - *ts = current_kernel_time64(); -#endif /* HAVE_KTIME_GET_COARSE_REAL_TS64 */ } static inline uint64_t gethrestime_sec(void) { -#if defined(HAVE_KTIME_GET_COARSE_REAL_TS64) inode_timespec_t ts; ktime_get_coarse_real_ts64(&ts); -#else - inode_timespec_t ts = current_kernel_time64(); -#endif /* HAVE_KTIME_GET_COARSE_REAL_TS64 */ return (ts.tv_sec); }