Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-304xx-kmod/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv18827
Modified Files:
nvidia-304xx-kmod.spec
Added Files:
4.0.0_kernel.patch
Log Message:
* Thu Mar 05 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 304.125-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-304xx-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-304xx-kmod/devel/nvidia-304xx-kmod.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- nvidia-304xx-kmod.spec 14 Feb 2015 13:18:19 -0000 1.30
+++ nvidia-304xx-kmod.spec 5 Mar 2015 12:45:38 -0000 1.31
@@ -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.125
# Taken over by kmodtool
-Release: 1%{?dist}.8
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -21,6 +21,7 @@
Source11: nvidia-304xx-kmodtool-excludekernel-filterfile
Patch0: 3.18_kernel.patch
+Patch1: 4.0.0_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -48,6 +49,7 @@
do
pushd nvidiapkg-${arch}
%patch0 -p1
+%patch1 -p1
popd
done
@@ -81,6 +83,9 @@
%changelog
+* Thu Mar 05 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 304.125-2
+- Patch for 4.0.0 kernel
+
* Sat Feb 14 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 304.125-1.8
- Rebuilt for kernel