[packages/xorg-driver-video-nvidia-legacy-390xx] - fix patching on i686

baggins baggins at pld-linux.org
Mon Apr 6 01:50:12 CEST 2020


commit 23759ce326dde7f080264d565b98073089288bfe
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 6 01:47:45 2020 +0200

    - fix patching on i686

 kernel-5.6-x8664.patch                     | 31 ++++++++++++++++++++++++++++++
 kernel-5.6.patch                           | 31 ------------------------------
 xorg-driver-video-nvidia-legacy-390xx.spec |  4 ++++
 3 files changed, 35 insertions(+), 31 deletions(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index 7250879..cebdf4a 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -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
diff --git a/kernel-5.6-x8664.patch b/kernel-5.6-x8664.patch
new file mode 100644
index 0000000..f11819b
--- /dev/null
+++ b/kernel-5.6-x8664.patch
@@ -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);
+ 
diff --git a/kernel-5.6.patch b/kernel-5.6.patch
index f29a06e..fd9875a 100644
--- a/kernel-5.6.patch
+++ b/kernel-5.6.patch
@@ -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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/23759ce326dde7f080264d565b98073089288bfe



More information about the pld-cvs-commit mailing list