Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-kmod/F-20
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv26603
Added Files:
4.0.0_kernel.patch
Log Message:
* Mon May 25 2015 Leigh Scott <leigh123linux(a)googlemail.com> - 1:331.113-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)
Show replies by date