summaryrefslogtreecommitdiffstats
path: root/system/nvidia-legacy304-kernel/disable-mtrr.patch
diff options
context:
space:
mode:
author Robby Workman2016-07-26 10:44:16 +0200
committer David Spencer2016-08-05 19:10:57 +0200
commitdcf59644556c55585cb8c51a01ab6b8c951035b5 (patch)
treed66ce77c85a1f6b2b410bf13e36edc721f3397c6 /system/nvidia-legacy304-kernel/disable-mtrr.patch
parent6ce46d43c431dbc347be61ad5739d6d60ecbc9cd (diff)
downloadslackbuilds-dcf59644556c55585cb8c51a01ab6b8c951035b5.tar.gz
system/nvidia-legacy304-kernel: Don't use deprecated mtrr API
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy304-kernel/disable-mtrr.patch')
-rw-r--r--system/nvidia-legacy304-kernel/disable-mtrr.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/system/nvidia-legacy304-kernel/disable-mtrr.patch b/system/nvidia-legacy304-kernel/disable-mtrr.patch
new file mode 100644
index 0000000000..326c287ec3
--- /dev/null
+++ b/system/nvidia-legacy304-kernel/disable-mtrr.patch
@@ -0,0 +1,25 @@
+Author: Luca Boccassi <luca.boccassi@gmail.com>
+Description: Disable MTRR on kernel >= 4.3
+ From kernel 4.3 and newer (commit 2baa891e42d84) mtrr_add and mtrr_del are no
+ longer exported. The Nvidia kernel shim still uses it as of 304.131, causing
+ the module to error out when loading. Disable MTRR if running on 4.3 or greater
+ until upstream fixes it.
+
+--- a/nv-linux.h
++++ b/nv-linux.h
+@@ -256,6 +256,15 @@
+ #include <linux/seq_file.h>
+ #endif
+
++/*
++ * As of version 304.131, os-agp.c and os-mtrr.c still use deprecated
++ * kernel APIs for mtrr which are no longer exported since 4.3, causing
++ * the module to error out when loaded.
++ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
++#undef CONFIG_MTRR
++#endif
++
+ #if !defined(NV_VMWARE) && defined(CONFIG_MTRR)
+ #include <asm/mtrr.h>
+ #endif