please add these patch in attach into pkg.

Regards
Andrea


-- 





This email is confidential and intended solely for the use of the
individual to whom it is addressed. The receiver of this message is
required to check if he/she has received it erroneously. If so, the
receiver is requested to immediately inform the sender and in consideration
of the responsibilities arising from undue use and/or disclosure of the
message and/or the information contained therein destroy the original
message and any copy or printout thereof. In reference D.Lgs 196/2003
diff -Npur NVIDIA-Linux-x86_64-304.orig/kernel/nv.c NVIDIA-Linux-x86_64-304.125-no-compat32/kernel/nv.c
--- NVIDIA-Linux-x86_64-304.orig/kernel/nv.c	2014-12-02 04:58:34.000000000 +0100
+++ NVIDIA-Linux-x86_64-304.125-no-compat32/kernel/nv.c	2014-12-21 17:50:33.420697348 +0100
@@ -2026,7 +2026,7 @@ long nv_kern_unlocked_ioctl(
     unsigned long i_arg
 )
 {
-    return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+    return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
 }
 
 long nv_kern_compat_ioctl(
@@ -2035,7 +2035,7 @@ long nv_kern_compat_ioctl(
     unsigned long i_arg
 )
 {
-    return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+    return nv_kern_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
 }
 
 /*
--- kernel/nv-pat.c~ 2015-02-22 20:39:43.889075396 -0800
+++ kernel/nv-pat.c 2015-02-22 20:29:33.519735577 -0800
@@ -35,8 +35,13 @@
     unsigned long cr0 = read_cr0();
     write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
     wbinvd();
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,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 +46,11 @@
     wbinvd();
     __flush_tlb();
     write_cr0((cr0 & 0x9fffffff));
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
+    if (cr4 & 0x80) __write_cr4(cr4);
+#else
     if (cr4 & 0x80) write_cr4(cr4);
+#endif
 }
 
 static int nv_determine_pat_mode(void)

Reply via email to