From a90196d4cda5fac99bf60c5a254e5bc02b58e71e Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 6 Mar 2016 00:56:53 +0100 Subject: [PATCH] nvidia_x11_legacy304: fix evaluation nvidia-340.76-kernel-4.0.patch was removed from nvidia_x11_legacy340 54d342add8ab512c5650e1b2da25708622dd327d but is still needed for 304. I think. CC @vcunat. --- .../nvidia-x11/nvidia-340.76-kernel-4.0.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch diff --git a/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch new file mode 100644 index 00000000000..5fdc1fed727 --- /dev/null +++ b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch @@ -0,0 +1,28 @@ +--- a/kernel/nv-pat.c 2015-07-03 08:39:35.417031728 +0200 ++++ b/kernel/nv-pat.c 2015-07-03 08:42:15.631838988 +0200 +@@ -35,8 +35,13 @@ + unsigned long cr0 = read_cr0(); + write_cr0(((cr0 & (0xdfffffff)) | 0x40000000)); + wbinvd(); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 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 @@ + wbinvd(); + __flush_tlb(); + write_cr0((cr0 & 0x9fffffff)); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) + if (cr4 & 0x80) write_cr4(cr4); ++#else ++ if (cr4 & 0x80) __write_cr4(cr4); ++#endif + } + + static int nv_determine_pat_mode(void)