system/nvidia-legacy340-kernel: Updated for version 340.107.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
unmaintained 2019-09-13 23:36:34 +07:00 committed by Willy Sudiarto Raharjo
parent a2cbab6b66
commit 822cebb5d9
No known key found for this signature in database
GPG key ID: 887B8374D7333381
3 changed files with 84 additions and 8 deletions

View file

@ -0,0 +1,67 @@
--- a/kernel/nv-linux.h 2018-12-14 19:32:47.000000000 +1100
+++ b/kernel/nv-linux.h 2018-12-20 01:02:36.066123342 +1100
@@ -2083,45 +2083,27 @@
/* get_user_pages
*
- * The 8-argument version of get_user_pages was deprecated by commit
- * (2016 Feb 12: cde70140fed8429acf7a14e2e2cbd3e329036653)for the non-remote case
- * (calling get_user_pages with current and current->mm).
- *
- * Completely moved to the 6 argument version of get_user_pages -
- * 2016 Apr 4: c12d2da56d0e07d230968ee2305aaa86b93a6832
- *
- * write and force parameters were replaced with gup_flags by -
- * 2016 Oct 12: 768ae309a96103ed02eb1e111e838c87854d8b51
- *
+ * hacked to work with 4.4.168
*/
-#if defined(NV_GET_USER_PAGES_HAS_TASK_STRUCT)
- #define NV_GET_USER_PAGES(start, nr_pages, write, force, pages, vmas) \
- get_user_pages(current, current->mm, start, nr_pages, write, force, pages, vmas)
-#else
- #if defined(NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS)
- #define NV_GET_USER_PAGES get_user_pages
- #else
- #include <linux/mm.h>
-
- static inline long NV_GET_USER_PAGES(unsigned long start,
- unsigned long nr_pages,
- int write,
- int force,
- struct page **pages,
- struct vm_area_struct **vmas)
- {
- unsigned int flags = 0;
-
- if (write)
- flags |= FOLL_WRITE;
- if (force)
- flags |= FOLL_FORCE;
-
- return get_user_pages(start, nr_pages, flags, pages, vmas);
- }
- #endif
-#endif
+#include <linux/mm.h>
+
+static inline long NV_GET_USER_PAGES(unsigned long start,
+ unsigned long nr_pages,
+ int write,
+ int force,
+ struct page **pages,
+ struct vm_area_struct **vmas)
+{
+ unsigned int flags = 0;
+
+ if (write)
+ flags |= FOLL_WRITE;
+ if (force)
+ flags |= FOLL_FORCE;
+
+ return get_user_pages(current, current->mm, start, nr_pages, flags, pages, vmas);
+}
/* get_user_pages_remote() was added by:
* 2016 Feb 12: 1e9877902dc7e11d2be038371c6fbf2dfcd469d7

View file

@ -28,7 +28,7 @@
# See changelog.txt
PRGNAM=nvidia-legacy340-kernel
VERSION=${VERSION:-340.104}
VERSION=${VERSION:-340.107}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -77,6 +77,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Patch to compile on kernels 4.4.168+
patch -p1 < $CWD/kernel-4.4.168.patch
(cd kernel || exit 1
make SYSSRC=$KERNELPATH module || exit 1
cd uvm
@ -85,7 +88,13 @@ find -L . \
mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/video
install -m 0664 kernel/nvidia.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
install -m 0664 kernel/uvm/nvidia-uvm.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
# Unified Memory kernel module is incompatible with recent Linux kernels,
# and the GPU hardware generations that the 340.xx legacy driver series is
# intended to support do not support Unified Memory.
if [ -e kernel/uvm/nvidia-uvm.ko ]; then
install -m 0664 kernel/uvm/nvidia-uvm.ko $PKG/lib/modules/$KERNEL/kernel/drivers/video/
fi
# Make sure the X is specified to automagically load the
# correct driver, since I always forget. You can remove

View file

@ -1,10 +1,10 @@
PRGNAM="nvidia-legacy340-kernel"
VERSION="340.104"
VERSION="340.107"
HOMEPAGE="http://www.nvidia.com"
DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/340.104/NVIDIA-Linux-x86-340.104.run"
MD5SUM="42e9c98e156f6ac2658ee526d796a428"
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/340.104/NVIDIA-Linux-x86_64-340.104.run"
MD5SUM_x86_64="4750891b7e175c0dc9a04608e493d141"
DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/340.107/NVIDIA-Linux-x86-340.107.run"
MD5SUM="9a4b382ef545d836033630224735d5dd"
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/340.107/NVIDIA-Linux-x86_64-340.107.run"
MD5SUM_x86_64="ba0fc5de5005679d1db9f5fa2cfabd38"
REQUIRES=""
MAINTAINER="Edward W. Koenig"
MAINTAINER="unmaintained"
EMAIL="kingbeowulf@gmail.com"