mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: use gk20a_free_inst_block in remove_vm
Use the common instance block freeing function when removing vm. Change-Id: I1dfaaceb57e01d0a1359ce5742ed55d81dff10ed Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/672033 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
4aef10c950
commit
8991080a99
@@ -268,16 +268,10 @@ static int gk20a_init_mm_reset_enable_hw(struct gk20a *g)
|
||||
static void gk20a_remove_vm(struct vm_gk20a *vm, struct inst_desc *inst_block)
|
||||
{
|
||||
struct gk20a *g = vm->mm->g;
|
||||
struct device *d = dev_from_gk20a(g);
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
if (inst_block->cpuva)
|
||||
dma_free_coherent(d, inst_block->size,
|
||||
inst_block->cpuva, inst_block->iova);
|
||||
inst_block->cpuva = NULL;
|
||||
inst_block->iova = 0;
|
||||
|
||||
gk20a_free_inst_block(g, inst_block);
|
||||
gk20a_vm_remove_support_nofree(vm);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user