kernel 6.5

This commit is contained in:
JerryXiao 2023-08-30 20:42:23 +08:00
parent f472f9297f
commit fa434fb5da
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5
3 changed files with 82 additions and 3 deletions

View file

@ -1,7 +1,7 @@
pkgbase = nvidia-340xx
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
pkgver = 340.108
pkgrel = 33
pkgrel = 34
url = https://www.nvidia.com/
arch = x86_64
license = custom
@ -25,6 +25,7 @@ pkgbase = nvidia-340xx
source = 0011-kernel-6.0.patch
source = 0012-kernel-6.2.patch
source = 0013-kernel-6.3.patch
source = 0014-kernel-6.5.patch
b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028
b2sums = 49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8
b2sums = 7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1
@ -40,6 +41,7 @@ pkgbase = nvidia-340xx
b2sums = 682a7b8e58d2a008531b7e5179e32c0c71adad673891a1057acd1aa26e410d9d93ff607e46257c6701619621cee1a27e613ec9ae19a580acdd6f68f1c1fdedea
b2sums = 47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821
b2sums = ae16e2a5674a8a93c85aa624e73b1671e85b2be1854caf967986f5764b946f7ca39a1e75c1617ee79da40a8d9a86cc1b17f64a787bc7a8c38f8dca426edeff46
b2sums = 01192b20986be28bd270842afcf022fbe43536dc2aac6479bc41b7760118aee8e6610290444212ed117d1a006bc24cca205aa39ccc760c6cbcb42f9102b815eb
pkgname = nvidia-340xx
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch

75
0014-kernel-6.5.patch Normal file
View file

@ -0,0 +1,75 @@
diff -Naur a/kernel/conftest.sh b/kernel/conftest.sh
--- a/kernel/conftest.sh 2023-09-09 04:19:11.170064889 +0000
+++ b/kernel/conftest.sh 2023-09-09 04:21:10.593482047 +0000
@@ -1977,6 +1977,30 @@
return
fi
+ # Conftest #4: check if vma arg was dropped
+ # Return if available.
+ # Fall through to default case if absent.
+
+ echo "$CONFTEST_PREAMBLE
+ #include <linux/mm.h>
+ long get_user_pages(unsigned long start,
+ unsigned long nr_pages,
+ unsigned int gup_flags,
+ struct page **pages) {
+ return 0;
+ }" > conftest$$.c
+
+ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+ rm -f conftest$$.c
+
+ if [ -f conftest$$.o ]; then
+ echo "#define NV_GET_USER_PAGES_DROPPED_VMA" | append_conftest "functions"
+ echo "#undef NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
+ echo "#undef NV_GET_USER_PAGES_HAS_TASK_STRUCT" | append_conftest "functions"
+ rm -f conftest$$.o
+ return
+ fi
+
echo "#define NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
echo "#define NV_GET_USER_PAGES_HAS_TASK_STRUCT" | append_conftest "functions"
@@ -1985,6 +2009,8 @@
;;
get_user_pages_remote)
+ echo "#define NV_GET_USER_PAGES_REMOTE_UNUSED" | append_conftest "functions"
+ return
#
# Determine if the function get_user_pages_remote() is
# present and has write/force parameters.
diff -Naur a/kernel/nv-linux.h b/kernel/nv-linux.h
--- a/kernel/nv-linux.h 2023-09-09 04:19:11.163398218 +0000
+++ b/kernel/nv-linux.h 2023-09-09 04:21:36.163499676 +0000
@@ -2205,7 +2205,11 @@
if (force)
flags |= FOLL_FORCE;
- return get_user_pages(start, nr_pages, flags, pages, vmas);
+ #if defined(NV_GET_USER_PAGES_DROPPED_VMA)
+ return get_user_pages(start, nr_pages, flags, pages);
+ #else
+ return get_user_pages(start, nr_pages, flags, pages, vmas);
+ #endif
}
#endif
#endif
@@ -2231,6 +2235,8 @@
* 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99
*/
+#if defined(NV_GET_USER_PAGES_REMOTE_UNUSED)
+#else
#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
#if defined (NV_GET_USER_PAGES_REMOTE_HAS_WRITE_AND_FORCE_ARGS)
#define NV_GET_USER_PAGES_REMOTE get_user_pages_remote
@@ -2295,5 +2301,6 @@
}
#endif
#endif
+#endif
#endif /* _NV_LINUX_H_ */

View file

@ -6,7 +6,7 @@
pkgbase=nvidia-340xx
pkgname=(nvidia-340xx nvidia-340xx-dkms); [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && pkgname=(nvidia-340xx-dkms)
pkgver=340.108
pkgrel=33
pkgrel=34
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
arch=('x86_64')
url="https://www.nvidia.com/"
@ -30,6 +30,7 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Li
0011-kernel-6.0.patch
0012-kernel-6.2.patch
0013-kernel-6.3.patch
0014-kernel-6.5.patch
)
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
'49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
@ -45,7 +46,8 @@ b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb
'd69c9acbe550d5fccca68ca6a0d5095cbcaf887d2bc43704a8eb85533896692f16701eef07ead297881f596f5502c3105bb5bea77b2dcaf6c4dc2b49941f9f19'
'682a7b8e58d2a008531b7e5179e32c0c71adad673891a1057acd1aa26e410d9d93ff607e46257c6701619621cee1a27e613ec9ae19a580acdd6f68f1c1fdedea'
'47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821'
'ae16e2a5674a8a93c85aa624e73b1671e85b2be1854caf967986f5764b946f7ca39a1e75c1617ee79da40a8d9a86cc1b17f64a787bc7a8c38f8dca426edeff46')
'ae16e2a5674a8a93c85aa624e73b1671e85b2be1854caf967986f5764b946f7ca39a1e75c1617ee79da40a8d9a86cc1b17f64a787bc7a8c38f8dca426edeff46'
'01192b20986be28bd270842afcf022fbe43536dc2aac6479bc41b7760118aee8e6610290444212ed117d1a006bc24cca205aa39ccc760c6cbcb42f9102b815eb')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
# default is 'linux' substitute custom name here