aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenard Spencer <lenardrspencer@gmail.com>2025-06-21 08:05:21 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2025-06-21 08:16:46 +0700
commitd0f162e388d116e89f2249699a3ead380ffe5b38 (patch)
treecf4bd1736d0b84fade5928ce7494031b8c0687d1
parent7bd9a183712631d90ef6bd56651663b3eaae6e6b (diff)
system/nvidia-kernel: Updated for version 570.169.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/nvidia-kernel/0003-Workaround-nv_vm_flags_-calling-GPL-only-code.patch104
-rw-r--r--system/nvidia-kernel/nvidia-kernel.SlackBuild6
-rw-r--r--system/nvidia-kernel/nvidia-kernel.info6
3 files changed, 5 insertions, 111 deletions
diff --git a/system/nvidia-kernel/0003-Workaround-nv_vm_flags_-calling-GPL-only-code.patch b/system/nvidia-kernel/0003-Workaround-nv_vm_flags_-calling-GPL-only-code.patch
deleted file mode 100644
index dbf4a476b2..0000000000
--- a/system/nvidia-kernel/0003-Workaround-nv_vm_flags_-calling-GPL-only-code.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 3b4e78d1107a4da33a805b161ade8f718454bd2d Mon Sep 17 00:00:00 2001
-From: Eric Naim <dnaim@cachyos.org>
-Date: Tue, 20 May 2025 00:11:56 +0800
-Subject: [PATCH] Workaround nv_vm_flags_* calling GPL-only code
-
-Since 6.15, the main body of vma_start_write() was uninlined and has
-been made GPL-only code. This means that the closed modules can no
-longer use vma_start_write() and functions calling it. Fortunately for
-us, an NVIDIA driver hacker that tries to maintain the legacy drivers
-for newer kernels claims that all VMAs that the driver uses are all
-either initially mapped or already locked, this means that using
-vm_flags_reset is sufficient to replace vm_flags_* helpers.
-
-Signed-off-by: Eric Naim <dnaim@cachyos.org>
----
- kernel-open/nvidia-drm/nvidia-drm-gem-user-memory.c | 7 +++++++
- kernel-open/nvidia-drm/nvidia-drm-gem.c | 7 +++++++
- kernel-open/nvidia-uvm/uvm.c | 7 +++++++
- kernel-open/nvidia/nv-mmap.c | 7 +++++++
- 4 files changed, 28 insertions(+)
-
-diff --git a/nvidia-drm/nvidia-drm-gem-user-memory.c b/nvidia-drm/nvidia-drm-gem-user-memory.c
-index 91d56ebb5..6e07bb023 100644
---- a/nvidia-drm/nvidia-drm-gem-user-memory.c
-+++ b/nvidia-drm/nvidia-drm-gem-user-memory.c
-@@ -44,6 +44,13 @@
- #include <vm/vm_pageout.h>
- #endif
-
-+#include <linux/version.h>
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
-+#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
-+#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
-+#endif
-+
- static inline
- void __nv_drm_gem_user_memory_free(struct nv_drm_gem_object *nv_gem)
- {
-diff --git a/nvidia-drm/nvidia-drm-gem.c b/nvidia-drm/nvidia-drm-gem.c
-index 5ac597823..8dff0abe6 100644
---- a/nvidia-drm/nvidia-drm-gem.c
-+++ b/nvidia-drm/nvidia-drm-gem.c
-@@ -51,6 +51,13 @@
-
- #include "nv-mm.h"
-
-+#include <linux/version.h>
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
-+#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
-+#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
-+#endif
-+
- void nv_drm_gem_free(struct drm_gem_object *gem)
- {
- struct nv_drm_gem_object *nv_gem = to_nv_gem_object(gem);
-diff --git a/nvidia-uvm/uvm.c b/nvidia-uvm/uvm.c
-index a9c182f82..bfec14dc0 100644
---- a/nvidia-uvm/uvm.c
-+++ b/nvidia-uvm/uvm.c
-@@ -21,6 +21,8 @@
-
- *******************************************************************************/
-
-+#include <linux/version.h>
-+
- #include "uvm_api.h"
- #include "uvm_global.h"
- #include "uvm_gpu_replayable_faults.h"
-@@ -40,6 +42,11 @@
-
- #define NVIDIA_UVM_DEVICE_NAME "nvidia-uvm"
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
-+#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
-+#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
-+#endif
-+
- static dev_t g_uvm_base_dev;
- static struct cdev g_uvm_cdev;
- static const struct file_operations uvm_fops;
-diff --git a/nvidia/nv-mmap.c b/nvidia/nv-mmap.c
-index 33c7d2982..813264c8f 100644
---- a/nvidia/nv-mmap.c
-+++ b/nvidia/nv-mmap.c
-@@ -23,10 +23,17 @@
-
- #define __NO_VERSION__
-
-+#include <linux/version.h>
-+
- #include "os-interface.h"
- #include "nv-linux.h"
- #include "nv_speculation_barrier.h"
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
-+#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
-+#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
-+#endif
-+
- /*
- * The 'struct vm_operations' open() callback is called by the Linux
- * kernel when the parent VMA is split or copied, close() when the
diff --git a/system/nvidia-kernel/nvidia-kernel.SlackBuild b/system/nvidia-kernel/nvidia-kernel.SlackBuild
index cc84be2b71..16ac708c73 100644
--- a/system/nvidia-kernel/nvidia-kernel.SlackBuild
+++ b/system/nvidia-kernel/nvidia-kernel.SlackBuild
@@ -29,8 +29,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-kernel
-VERSION=${VERSION:-570.153.02}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-570.169}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -93,8 +93,6 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
( cd kernel$OPEN1 || exit 1
-# Patch for 6.15 kernel as workaround for GPL-only symbols:
-patch -p1 < $CWD/0003-Workaround-nv_vm_flags_-calling-GPL-only-code.patch
# CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch"
# message. If you custom-build your kernel with clang,
# then pass CC=clang to this script.
diff --git a/system/nvidia-kernel/nvidia-kernel.info b/system/nvidia-kernel/nvidia-kernel.info
index 932c6eabee..3e51a1e7d0 100644
--- a/system/nvidia-kernel/nvidia-kernel.info
+++ b/system/nvidia-kernel/nvidia-kernel.info
@@ -1,10 +1,10 @@
PRGNAM="nvidia-kernel"
-VERSION="570.153.02"
+VERSION="570.169"
HOMEPAGE="https://www.nvidia.com"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/570.153.02/NVIDIA-Linux-x86_64-570.153.02.run"
-MD5SUM_x86_64="0981edd4e93370e329c6ba505f159bd5"
+DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/570.169/NVIDIA-Linux-x86_64-570.169.run"
+MD5SUM_x86_64="34c236a1cf79a35321e9fb0e818568e2"
REQUIRES=""
MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmail.com"