Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-304xx-kmod/F-20
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv26778
Modified Files:
nvidia-304xx-kmod.spec
Added Files:
4.0.0_kernel.patch
Log Message:
* Mon May 25 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 304.123-3
- 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-304xx-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-304xx-kmod/F-20/nvidia-304xx-kmod.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- nvidia-304xx-kmod.spec 24 May 2015 15:58:26 -0000 1.80
+++ nvidia-304xx-kmod.spec 25 May 2015 13:11:25 -0000 1.81
@@ -3,12 +3,12 @@
# "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-304xx-kmod
Version: 304.123
# Taken over by kmodtool
-Release: 2%{?dist}.6
+Release: 3%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -18,6 +18,7 @@
#ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg0.run
Source0: nvidia-kmod-data-%{version}.tar.xz
Patch0: 3.19_kernel.patch
+Patch1: 4.0.0_kernel.patch
Source11: nvidia-304xx-kmodtool-excludekernel-filterfile
@@ -47,6 +48,7 @@
do
pushd nvidiapkg-${arch}
%patch0 -p1
+%patch1 -p1
popd
done
@@ -80,6 +82,9 @@
%changelog
+* Mon May 25 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 304.123-3
+- Patch for 4.0.0 kernel
+
* Sun May 24 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 304.123-2.6
- Rebuilt for kernel