Lines Matching refs:vma
107 struct nvkm_vma *vma; in nvkm_uvmm_mthd_unmap() local
117 vma = nvkm_vmm_node_search(vmm, addr); in nvkm_uvmm_mthd_unmap()
118 if (ret = -ENOENT, !vma || vma->addr != addr) { in nvkm_uvmm_mthd_unmap()
120 addr, vma ? vma->addr : ~0ULL); in nvkm_uvmm_mthd_unmap()
124 if (ret = -ENOENT, vma->busy) { in nvkm_uvmm_mthd_unmap()
125 VMM_DEBUG(vmm, "denied %016llx: %d", addr, vma->busy); in nvkm_uvmm_mthd_unmap()
129 if (ret = -EINVAL, !vma->memory) { in nvkm_uvmm_mthd_unmap()
134 nvkm_vmm_unmap_locked(vmm, vma, false); in nvkm_uvmm_mthd_unmap()
150 struct nvkm_vma *vma; in nvkm_uvmm_mthd_map() local
169 if (ret = -ENOENT, !(vma = nvkm_vmm_node_search(vmm, addr))) { in nvkm_uvmm_mthd_map()
174 if (ret = -ENOENT, vma->busy) { in nvkm_uvmm_mthd_map()
175 VMM_DEBUG(vmm, "denied %016llx: %d", addr, vma->busy); in nvkm_uvmm_mthd_map()
179 if (ret = -EINVAL, vma->mapped && !vma->memory) { in nvkm_uvmm_mthd_map()
184 if (ret = -EINVAL, vma->addr != addr || vma->size != size) { in nvkm_uvmm_mthd_map()
185 if (addr + size > vma->addr + vma->size || vma->memory || in nvkm_uvmm_mthd_map()
186 (vma->refd == NVKM_VMA_PAGE_NONE && !vma->mapref)) { in nvkm_uvmm_mthd_map()
189 !!vma->memory, vma->refd, vma->mapref, in nvkm_uvmm_mthd_map()
190 addr, size, vma->addr, (u64)vma->size); in nvkm_uvmm_mthd_map()
194 vma = nvkm_vmm_node_split(vmm, vma, addr, size); in nvkm_uvmm_mthd_map()
195 if (!vma) { in nvkm_uvmm_mthd_map()
200 vma->busy = true; in nvkm_uvmm_mthd_map()
203 ret = nvkm_memory_map(memory, offset, vmm, vma, argv, argc); in nvkm_uvmm_mthd_map()
211 vma->busy = false; in nvkm_uvmm_mthd_map()
212 nvkm_vmm_unmap_region(vmm, vma); in nvkm_uvmm_mthd_map()
226 struct nvkm_vma *vma; in nvkm_uvmm_mthd_put() local
236 vma = nvkm_vmm_node_search(vmm, args->v0.addr); in nvkm_uvmm_mthd_put()
237 if (ret = -ENOENT, !vma || vma->addr != addr || vma->part) { in nvkm_uvmm_mthd_put()
239 vma ? vma->addr : ~0ULL, vma ? vma->part : 0); in nvkm_uvmm_mthd_put()
243 if (ret = -ENOENT, vma->busy) { in nvkm_uvmm_mthd_put()
244 VMM_DEBUG(vmm, "denied %016llx: %d", addr, vma->busy); in nvkm_uvmm_mthd_put()
248 nvkm_vmm_put_locked(vmm, vma); in nvkm_uvmm_mthd_put()
262 struct nvkm_vma *vma; in nvkm_uvmm_mthd_get() local
280 page, align, size, &vma); in nvkm_uvmm_mthd_get()
285 args->v0.addr = vma->addr; in nvkm_uvmm_mthd_get()