# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/nvidia-open/hotfix-linux-6.15.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- open-gpu-kernel-modules-575.57.08/kernel-open/nvidia-drm/nvidia-drm-gem.c.vanilla +++ open-gpu-kernel-modules-575.57.08/kernel-open/nvidia-drm/nvidia-drm-gem.c @@ -51,6 +51,13 @@ #include "nv-mm.h" +#include + +#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); --- open-gpu-kernel-modules-575.57.08/kernel-open/nvidia/nv-mmap.c.vanilla +++ open-gpu-kernel-modules-575.57.08/kernel-open/nvidia/nv-mmap.c @@ -23,10 +23,17 @@ #define __NO_VERSION__ +#include + #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 --- open-gpu-kernel-modules-575.57.08/kernel-open/nvidia-uvm/uvm.c.vanilla +++ open-gpu-kernel-modules-575.57.08/kernel-open/nvidia-uvm/uvm.c @@ -21,6 +21,8 @@ *******************************************************************************/ +#include + #include "uvm_api.h" #include "uvm_global.h" #include "uvm_gpu_replayable_faults.h" @@ -42,6 +44,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;