Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-340xx-kmod/F-20
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv27026
Modified Files:
nvidia-340xx-kmod.spec
Added Files:
4.0.0_kernel.patch
Log Message:
* Mon May 25 2015 Leigh Scott <leigh123linux(a)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/F-20/nvidia-340xx-kmod.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- nvidia-340xx-kmod.spec 24 May 2015 15:58:33 -0000 1.20
+++ nvidia-340xx-kmod.spec 25 May 2015 13:16:03 -0000 1.21
@@ -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}.14
+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
+* Mon May 25 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 1:340.76-2
+- Patch for 4.0.0 kernel
+
* Sun May 24 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 1:340.76-1.14
- Rebuilt for kernel
Show replies by date