Skip to content

Instantly share code, notes, and snippets.

@tpruzina
Last active December 10, 2018 15:41
Show Gist options
  • Save tpruzina/c1ccecbe02e4a9859e989e0a0ce1dea8 to your computer and use it in GitHub Desktop.
Save tpruzina/c1ccecbe02e4a9859e989e0a0ce1dea8 to your computer and use it in GitHub Desktop.
NVIDIA-Linux-x86_64-415.18 20.0-rc3-next-20181123-CONFIG_DRM_NO.patch
diff --git a/nvidia-uvm/uvm_linux.h b/nvidia-uvm/uvm_linux.h
index 8c42751..28fb0ef 100644
--- a/nvidia-uvm/uvm_linux.h
+++ b/nvidia-uvm/uvm_linux.h
@@ -254,7 +254,8 @@
#define nv_copy_from_user copy_from_user
#endif
-#if defined(NV_ATOMIC64_PRESENT)
+//#if defined(NV_ATOMIC64_PRESENT)
+#if 1
typedef atomic64_t NV_ATOMIC64;
#define NV_ATOMIC64_INC(data) atomic64_inc(&(data))
#define NV_ATOMIC64_SET(data,val) atomic64_set(&(data), (val))
diff --git a/nvidia/linux_nvswitch.c b/nvidia/linux_nvswitch.c
index 75b5598..d81b0e4 100644
--- a/nvidia/linux_nvswitch.c
+++ b/nvidia/linux_nvswitch.c
@@ -1582,7 +1582,7 @@ nvswitch_os_snprintf_time
struct tm t;
NvS32 date_end;
- time_to_tm(time_nsec / NVSWITCH_NSEC_PER_SEC, 0, &t);
+ time64_to_tm(time_nsec / NVSWITCH_NSEC_PER_SEC, 0, &t);
date_end = snprintf(date,
date_len,
@tpruzina
Copy link
Author

Usage:

cd NVIDIA-Linux-415.18/kernel
patch -p1 <<< $(curl https://gist.githubusercontent.com/tpruzina/c1ccecbe02e4a9859e989e0a0ce1dea8/raw/1a1a11d42fe25480134e7575bce2371f2cba358c/NVIDIA-415.18-20.0-rc3-next.patch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment