Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-kmod/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv16368
Modified Files:
nvidia-kmod.spec
Added Files:
4.0.0_kernel.patch
Log Message:
* Tue Feb 24 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 1:346.35-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-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-kmod/devel/nvidia-kmod.spec,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -r1.185 -r1.186
--- nvidia-kmod.spec 14 Feb 2015 13:18:35 -0000 1.185
+++ nvidia-kmod.spec 24 Feb 2015 10:13:54 -0000 1.186
@@ -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-kmod
Epoch: 1
Version: 346.35
# 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
@@ -18,6 +18,7 @@
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: 3.18_kernel.patch
+Patch2: 4.0.0_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -45,6 +46,7 @@
# patch loop
%patch0 -p1
%patch1 -p1
+%patch2 -p1
for kernel_version in %{?kernel_versions} ; do
@@ -92,6 +94,9 @@
%changelog
+* Tue Feb 24 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 1:346.35-2
+- Patch for 4.0.0 kernel
+
* Sat Feb 14 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 1:346.35-1.5
- Rebuilt for kernel