- fix building with linux 4.0 auto/th/xorg-driver-video-nvidia-346.35-4
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 19 Apr 2015 11:53:55 +0000 (13:53 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 19 Apr 2015 11:53:55 +0000 (13:53 +0200)
- rel 4

linux-4.0.patch [new file with mode: 0644]
xorg-driver-video-nvidia.spec

diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644 (file)
index 0000000..fcbc23b
--- /dev/null
@@ -0,0 +1,14 @@
+--- NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-linux.h~  2015-01-11 05:30:46.000000000 +0100
++++ NVIDIA-Linux-x86_64-346.35-no-compat32/kernel/nv-linux.h   2015-04-19 13:51:50.919754915 +0200
+@@ -336,6 +336,11 @@
+ #define NV_SPIN_UNLOCK(lock)      spin_unlock(lock)
+ #define NV_SPIN_UNLOCK_WAIT(lock) spin_unlock_wait(lock)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
++#define read_cr4 __read_cr4
++#define write_cr4 __write_cr4
++#endif
++
+ #if defined(NVCPU_X86)
+ #ifndef write_cr4
+ #define write_cr4(x) __asm__ ("movl %0,%%cr4" :: "r" (x));
index 1eff39de34f73b636933678bafd06fe51b98ca9c..f4227b8288b068a6677a195a73b774f3789f3da8 100644 (file)
@@ -25,7 +25,7 @@ exit 1
 
 %define                no_install_post_check_so 1
 
-%define                rel     3
+%define                rel     4
 %define                pname   xorg-driver-video-nvidia
 Summary:       Linux Drivers for nVidia GeForce/Quadro Chips
 Summary(hu.UTF-8):     Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -48,6 +48,7 @@ Source5:      10-nvidia-modules.conf
 Patch0:                X11-driver-nvidia-GL.patch
 Patch1:                X11-driver-nvidia-desktop.patch
 Patch2:                nvidia-kernel-3.18.patch
+Patch3:                linux-4.0.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}}
@@ -250,6 +251,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %patch0 -p1
 %patch1 -p1
 %patch2 -p0
+%patch3 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
This page took 1.114949 seconds and 4 git commands to generate.