mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-05-05 13:41:44 +00:00
530.30.02
This commit is contained in:
@@ -284,12 +284,12 @@ NV_STATUS uvm_rm_mem_map_gpu(uvm_rm_mem_t *rm_mem, uvm_gpu_t *gpu, NvU64 gpu_ali
|
||||
UVM_ASSERT(rm_mem);
|
||||
UVM_ASSERT(gpu);
|
||||
|
||||
// Peer mappings not supported yet
|
||||
UVM_ASSERT(rm_mem->type == UVM_RM_MEM_TYPE_SYS);
|
||||
|
||||
if (uvm_rm_mem_mapped_on_gpu(rm_mem, gpu))
|
||||
return NV_OK;
|
||||
|
||||
// Peer mappings are not supported yet
|
||||
UVM_ASSERT(rm_mem->type == UVM_RM_MEM_TYPE_SYS);
|
||||
|
||||
gpu_owner = rm_mem->gpu_owner;
|
||||
gpu_owner_va = uvm_rm_mem_get_gpu_uvm_va(rm_mem, gpu_owner);
|
||||
|
||||
@@ -334,8 +334,9 @@ void uvm_rm_mem_unmap_gpu(uvm_rm_mem_t *rm_mem, uvm_gpu_t *gpu)
|
||||
UVM_ASSERT(rm_mem);
|
||||
UVM_ASSERT(gpu);
|
||||
|
||||
// Cannot unmap from the gpu that owns the allocation.
|
||||
UVM_ASSERT_MSG(rm_mem->gpu_owner != gpu, "GPU %s\n", uvm_gpu_name(gpu));
|
||||
// The GPU owner mapping remains valid until the memory is freed.
|
||||
if (gpu == rm_mem->gpu_owner)
|
||||
return;
|
||||
|
||||
rm_mem_unmap_gpu(rm_mem, gpu);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user