index 2c799c9..0206062 100644
--- a/kernel/common/inc/nv-time.h
+++ b/kernel/common/inc/nv-time.h
-@@ -30,7 +30,12 @@
+@@ -30,7 +30,17 @@
#include <linux/ktime.h>
#endif
-static inline void nv_gettimeofday(struct timeval *tv)
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
++#define nv_timeval timeval
++#else
+struct nv_timeval {
+ __kernel_long_t tv_sec;
+ __kernel_suseconds_t tv_usec;
+};
++#endif
+
+static inline void nv_gettimeofday(struct nv_timeval *tv)
{
ioremap_wc)
#
# Determine if the ioremap_wc() function is present.
-@@ -1430,6 +1446,31 @@ compile_test() {
+@@ -1430,6 +1446,29 @@ compile_test() {
compile_check_conftest "$CODE" "NV_SG_ALLOC_TABLE_FROM_PAGES_PRESENT" "" "functions"
;;
+ CODE="
+ #include <linux/ktime.h>
+ int conftest_ktime_get_raw_ts64(void) {
-+ struct timespec64 ts = {0};
-+
-+ ktime_get_raw_ts64(&ts64);
++ ktime_get_raw_ts64();
+ }"
+
+ compile_check_conftest "$CODE" "NV_KTIME_GET_RAW_TS64_PRESENT" "" "functions"
nv_gettimeofday(&tv);
-diff --git a/kernel/nvidia-uvm/uvm_linux.h b/kernel/nvidia-uvm/uvm_linux.h
-index 8784a82..c256cdb 100644
---- a/kernel/nvidia-uvm/uvm_linux.h
-+++ b/kernel/nvidia-uvm/uvm_linux.h
-@@ -329,7 +329,16 @@ static inline uint64_t NV_DIV64(uint64_t dividend, uint64_t divisor, uint64_t *r
- }
- #endif
-
--#if defined(CLOCK_MONOTONIC_RAW)
-+#if defined(NV_KTIME_GET_RAW_TS64_PRESENT)
-+static inline NvU64 NV_GETTIME(void)
-+{
-+ struct timespec64 ts64 = {0};
-+
-+ ktime_get_raw_ts64(&ts64);
-+
-+ return (ts64.tv_sec * 1000000000ULL + ts64.tv_nsec);
-+}
-+#elif defined(CLOCK_MONOTONIC_RAW)
- /* Return a nanosecond-precise value */
- static inline NvU64 NV_GETTIME(void)
- {
-@@ -345,7 +354,7 @@ static inline NvU64 NV_GETTIME(void)
- * available non-GPL symbols. */
- static inline NvU64 NV_GETTIME(void)
- {
-- struct timeval tv = {0};
-+ struct nv_timeval tv = {0};
-
- nv_gettimeofday(&tv);
-
diff --git a/kernel/nvidia/nv-procfs.c b/kernel/nvidia/nv-procfs.c
index 5808a88..bc60a08 100644
--- a/kernel/nvidia/nv-procfs.c