- fix patching on i686
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 5 Apr 2020 23:47:45 +0000 (01:47 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 5 Apr 2020 23:47:45 +0000 (01:47 +0200)
kernel-5.6-x8664.patch [new file with mode: 0644]
kernel-5.6.patch
xorg-driver-video-nvidia-legacy-390xx.spec

diff --git a/kernel-5.6-x8664.patch b/kernel-5.6-x8664.patch
new file mode 100644 (file)
index 0000000..f11819b
--- /dev/null
@@ -0,0 +1,31 @@
+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);
index f29a06e50b06f3425cb4daf11cef081a954dd8dd..fd9875a7a4eb0e8aef1fca3d61aa4b046ec14be1 100644 (file)
@@ -181,37 +181,6 @@ index d42aabb..f0404fb 100644
  
      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
index 7250879186135c83ba29064365a2facdd58cbcc8..cebdf4a796f96dde390187a71f4437869a42587c 100644 (file)
@@ -57,6 +57,7 @@ Patch0:               X11-driver-nvidia-GL.patch
 Patch1:                X11-driver-nvidia-desktop.patch
 Patch2:                kernel-5.5.patch
 Patch3:                kernel-5.6.patch
+Patch4:                kernel-5.6-x8664.patch
 URL:           http://www.nvidia.com/object/unix.html
 BuildRequires: rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -265,6 +266,9 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%ifarch %{x8664}
+%patch4 -p1
+%endif
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
This page took 0.566111 seconds and 4 git commands to generate.