system/nvidia-legacy470-kernel: Updated for version 470.239.06.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Lenard Spencer 2024-03-08 17:56:07 +07:00 committed by Willy Sudiarto Raharjo
parent 5f2f275dbd
commit 6db531c034
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 6 additions and 54 deletions

View file

@ -31,8 +31,8 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-legacy470-kernel PRGNAM=nvidia-legacy470-kernel
VERSION=${VERSION:-470.223.02} VERSION=${VERSION:-470.239.06}
BUILD=${BUILD:-2} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -89,9 +89,6 @@ find -L . \
unset ARCH unset ARCH
# Patch for latest 6.x kernels:
patch -p2 < $CWD/nvidia-rcu_read_lock-unlock.patch
# CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch" # CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch"
# message. If you custom-build your kernel with clang, # message. If you custom-build your kernel with clang,
# then pass CC=clang to this script. # then pass CC=clang to this script.

View file

@ -1,10 +1,10 @@
PRGNAM="nvidia-legacy470-kernel" PRGNAM="nvidia-legacy470-kernel"
VERSION="470.223.02" VERSION="470.239.06"
HOMEPAGE="http://www.nvidia.com" HOMEPAGE="https://www.nvidia.com"
DOWNLOAD="UNSUPPORTED" DOWNLOAD="UNSUPPORTED"
MD5SUM="" MD5SUM=""
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/470.223.02/NVIDIA-Linux-x86_64-470.223.02.run" DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/470.239.06/NVIDIA-Linux-x86_64-470.239.06.run"
MD5SUM_x86_64="b6b2b79cd6d8288e42546b785e6c1d0a" MD5SUM_x86_64="4d007f78ef892929399aaf02152f4c38"
REQUIRES="" REQUIRES=""
MAINTAINER="Lenard Spencer" MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmail.com" EMAIL="lenardrspencer@gmail.com"

View file

@ -1,45 +0,0 @@
--- a/kernel/common/inc/nv-linux.h
+++ b/kernel/common/inc/nv-linux.h
@@ -1990,2 +1990,23 @@
+#if defined(CONFIG_HAVE_ARCH_PFN_VALID) || LINUX_VERSION_CODE < KERNEL_VERSION(6,1,76)
+# define nv_pfn_valid pfn_valid
+#else
+/* pre-6.1.76 kernel pfn_valid version without GPL rcu_read_lock/unlock() */
+static inline int nv_pfn_valid(unsigned long pfn)
+{
+ struct mem_section *ms;
+
+ if (PHYS_PFN(PFN_PHYS(pfn)) != pfn)
+ return 0;
+
+ if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
+ return 0;
+
+ ms = __pfn_to_section(pfn);
+ if (!valid_section(ms))
+ return 0;
+
+ return early_section(ms) || pfn_section_valid(ms, pfn);
+}
+#endif
#endif /* _NV_LINUX_H_ */
--- a/kernel/nvidia/nv-mmap.c
+++ b/kernel/nvidia/nv-mmap.c
@@ -576,3 +576,3 @@
if (!IS_REG_OFFSET(nv, access_start, access_len) &&
- (pfn_valid(PFN_DOWN(mmap_start))))
+ (nv_pfn_valid(PFN_DOWN(mmap_start))))
{
--- a/kernel/nvidia/os-mlock.c
+++ b/kernel/nvidia/os-mlock.c
@@ -102,3 +102,3 @@
if ((nv_follow_pfn(vma, (start + (i * PAGE_SIZE)), &pfn) < 0) ||
- (!pfn_valid(pfn)))
+ (!nv_pfn_valid(pfn)))
{
@@ -176,3 +176,3 @@
- if (pfn_valid(pfn))
+ if (nv_pfn_valid(pfn))
{