kernel 6.5

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

View file

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

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

@ -0,0 +1,60 @@
--- a/kernel/nv-linux.h 2023-08-30 21:22:59.876552334 +0000
+++ b/kernel/nv-linux.h 2023-08-30 21:22:59.876590493 +0000
@@ -2158,7 +2158,27 @@
*
*/
-#if defined(NV_GET_USER_PAGES_HAS_TASK_STRUCT)
+// Rel. commit. "mm/gup: remove unused vmas parameter from get_user_pages()" (Lorenzo Stoakes, 14 May 2023)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
+#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);
+}
+#elif defined(NV_GET_USER_PAGES_HAS_TASK_STRUCT)
#if defined(NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS)
#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)
@@ -2231,7 +2251,27 @@
* 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99
*/
-#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
+// Rel. commit. "mm/gup: remove unused vmas parameter from get_user_pages_remote()" (Lorenzo Stoakes, 14 May 2023)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
+static inline long NV_GET_USER_PAGES_REMOTE(struct task_struct *tsk,
+ struct mm_struct *mm,
+ 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_remote(mm, start, nr_pages, flags, pages, NULL);
+}
+#elif 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
#else

View file

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