diff options
author | Lenard Spencer <lenardrspencer@gmai.com> | 2024-03-10 20:54:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-03-11 06:44:42 +0700 |
commit | 2411938db958e663da6852846541fbbe98b59bb8 (patch) | |
tree | fcebd4515b83b9e0439912c6a190db6556a7cb7f /system/nvidia-legacy390-kernel | |
parent | d17c6f08bff588301c2ec24b110222f715caf4f8 (diff) |
system/nvidia-legacy390-kernel: Fix build on i586.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy390-kernel')
3 files changed, 22 insertions, 17 deletions
diff --git a/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild b/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild index aedaf0445fce7..ba575bb815985 100644 --- a/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild +++ b/system/nvidia-legacy390-kernel/nvidia-legacy390-kernel.SlackBuild @@ -87,11 +87,16 @@ find -L . \ unset ARCH cd kernel || exit 1 -# Patch for kernel 6.6.x +# Patches for kernel 6.6.x if [ "${KERNEL66:-no}" = "yes" ]; then - for i in `ls $CWD/patches`; do - patch -p1 < $CWD/patches/$i - done + patch -p1 < $CWD/patches/kernel-6.2.patch + patch -p1 < $CWD/patches/kernel-6.3.patch + if [ "$ARCH" = "x86_64" ]; then + patch -p1 < $CWD/patches/kernel-6.3_64.patch + fi + patch -p1 < $CWD/patches/kernel-6.4.patch + patch -p1 < $CWD/patches/kernel-6.5.patch + patch -p1 < $CWD/patches/kernel-6.6.patch fi # CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch" diff --git a/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch b/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch index f062e780d7a66..b6c7bb1580df0 100644 --- a/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch +++ b/system/nvidia-legacy390-kernel/patches/kernel-6.3.patch @@ -32,19 +32,6 @@ index 725164a..c35e0ee 100644 #include <drm/drm_crtc_helper.h> -diff --git a/nvidia-uvm/uvm8.c b/nvidia-uvm/uvm8.c -index 11cb373..49e1047 100644 ---- a/nvidia-uvm/uvm8.c -+++ b/nvidia-uvm/uvm8.c -@@ -658,7 +658,7 @@ static int uvm_mmap(struct file *filp, struct vm_area_struct *vma) - // Using VM_DONTCOPY would be nice, but madvise(MADV_DOFORK) can reset that - // so we have to handle vm_open on fork anyway. We could disable MADV_DOFORK - // with VM_IO, but that causes other mapping issues. -- vma->vm_flags |= VM_MIXEDMAP | VM_DONTEXPAND; -+ vm_flags_set(vma, VM_MIXEDMAP | VM_DONTEXPAND); - - vma->vm_ops = &uvm_vm_ops_managed; - diff --git a/nvidia/nv-mmap.c b/nvidia/nv-mmap.c index 0b0a6f2..da891ff 100644 --- a/nvidia/nv-mmap.c diff --git a/system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch b/system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch new file mode 100644 index 0000000000000..1b2bfe6c898bc --- /dev/null +++ b/system/nvidia-legacy390-kernel/patches/kernel-6.3_64.patch @@ -0,0 +1,13 @@ +diff --git a/nvidia-uvm/uvm8.c b/nvidia-uvm/uvm8.c +index 11cb373..49e1047 100644 +--- a/nvidia-uvm/uvm8.c ++++ b/nvidia-uvm/uvm8.c +@@ -658,7 +658,7 @@ static int uvm_mmap(struct file *filp, struct vm_area_struct *vma) + // Using VM_DONTCOPY would be nice, but madvise(MADV_DOFORK) can reset that + // so we have to handle vm_open on fork anyway. We could disable MADV_DOFORK + // with VM_IO, but that causes other mapping issues. +- vma->vm_flags |= VM_MIXEDMAP | VM_DONTEXPAND; ++ vm_flags_set(vma, VM_MIXEDMAP | VM_DONTEXPAND); + + vma->vm_ops = &uvm_vm_ops_managed; + |