rpms/nvidia-340xx-kmod/devel 4.0.0_kernel.patch, NONE, 1.1 nvidia-340xx-kmod.spec, 1.10, 1.11

Leigh Scott leigh123linux at rpmfusion.org
Thu Mar 5 14:38:24 CET 2015


Author: leigh123linux

Update of /cvs/nonfree/rpms/nvidia-340xx-kmod/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv19546

Modified Files:
	nvidia-340xx-kmod.spec 
Added Files:
	4.0.0_kernel.patch 
Log Message:
* Thu Mar 05 2015 Leigh Scott <leigh123linux at googlemail.com> - 1:340.76-2
- Patch for 4.0.0 kernel


4.0.0_kernel.patch:
 nv-pat.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- NEW FILE 4.0.0_kernel.patch ---
--- a/kernel/nv-pat.c	2015-01-11 04:30:46.000000000 +0000
+++ b/kernel/nv-pat.c	2015-02-23 10:39:33.352315652 +0000
@@ -35,8 +35,13 @@ static inline void nv_disable_caches(uns
     unsigned long cr0 = read_cr0();
     write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
     wbinvd();
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,20,0)
+    *cr4 = __read_cr4();
+    if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
+#else
     *cr4 = read_cr4();
     if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
+#endif
     __flush_tlb();
 }
 
@@ -46,7 +51,11 @@ static inline void nv_enable_caches(unsi
     wbinvd();
     __flush_tlb();
     write_cr0((cr0 & 0x9fffffff));
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,20,0)
+    if (cr4 & 0x80) __write_cr4(cr4);
+#else
     if (cr4 & 0x80) write_cr4(cr4);
+#endif
 }
 
 static int nv_determine_pat_mode(void)


Index: nvidia-340xx-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-340xx-kmod/devel/nvidia-340xx-kmod.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- nvidia-340xx-kmod.spec	14 Feb 2015 13:18:27 -0000	1.10
+++ nvidia-340xx-kmod.spec	5 Mar 2015 13:38:24 -0000	1.11
@@ -3,13 +3,13 @@
 # "buildforkernels newest" macro for just that build; immediately after
 # queuing that build enable the macro again for subsequent builds; that way
 # a new akmod package will only get build when a new one is actually needed
-%global buildforkernels newest
+%global buildforkernels current
 
 Name:          nvidia-340xx-kmod
 Epoch:         1
 Version:       340.76
 # Taken over by kmodtool
-Release:       1%{?dist}.5
+Release:       2%{?dist}
 Summary:       NVIDIA display driver kernel module
 Group:         System Environment/Kernel
 License:       Redistributable, no modification permitted
@@ -17,6 +17,7 @@
 
 Source11:      nvidia-kmodtool-excludekernel-filterfile
 Patch0:        nv-linux-arm.patch
+Patch1:        4.0.0_kernel.patch
 
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -44,6 +45,7 @@
 tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
 # patch loop
 %patch0 -p1
+%patch1 -p1
 
 for kernel_version  in %{?kernel_versions} ; do
     cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -91,6 +93,9 @@
 
 
 %changelog
+* Thu Mar 05 2015 Leigh Scott <leigh123linux at googlemail.com> - 1:340.76-2
+- Patch for 4.0.0 kernel
+
 * Sat Feb 14 2015 Nicolas Chauvet <kwizart at gmail.com> - 1:340.76-1.5
 - Rebuilt for kernel
 


More information about the rpmfusion-commits mailing list