diff options
author | Balló György | 2015-07-03 17:00:41 +0200 |
---|---|---|
committer | Balló György | 2015-07-03 17:00:41 +0200 |
commit | b65b3a680306522d56cfbcfaf188df12d30310bf (patch) | |
tree | 6f6bee12dc3801948d4c62125579166d8db61578 /linux-4.0.patch | |
download | aur-b65b3a680306522d56cfbcfaf188df12d30310bf.tar.gz |
upgpkg: nvidia-173xx-dkms 173.14.39-5
Initial commit
Diffstat (limited to 'linux-4.0.patch')
-rw-r--r-- | linux-4.0.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linux-4.0.patch b/linux-4.0.patch new file mode 100644 index 000000000000..0e023c54a231 --- /dev/null +++ b/linux-4.0.patch @@ -0,0 +1,29 @@ +diff -Naur nv.orig/nv.c nv/nv.c +--- nv.orig/nv.c 2015-04-16 13:40:32.359209000 +0200 ++++ nv/nv.c 2015-04-16 13:43:35.743919299 +0200 +@@ -841,8 +841,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(); + } + +@@ -852,7 +857,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 __determine_pat_mode() |