mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: free all vm's when removing support
Remove both bar1 and pmu. Bug 1476801 Change-Id: I0c194db06b576083ddaab3726b8575ebce473d84 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/592114 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
97e6847cb1
commit
eb74267b83
@@ -265,12 +265,10 @@ static int gk20a_init_mm_reset_enable_hw(struct gk20a *g)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gk20a_remove_mm_support(struct mm_gk20a *mm)
|
||||
static void gk20a_remove_vm(struct vm_gk20a *vm, struct inst_desc *inst_block)
|
||||
{
|
||||
struct gk20a *g = mm->g;
|
||||
struct gk20a *g = vm->mm->g;
|
||||
struct device *d = dev_from_gk20a(g);
|
||||
struct vm_gk20a *vm = &mm->bar1.vm;
|
||||
struct inst_desc *inst_block = &mm->bar1.inst_block;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
@@ -283,6 +281,12 @@ static void gk20a_remove_mm_support(struct mm_gk20a *mm)
|
||||
gk20a_vm_remove_support_nofree(vm);
|
||||
}
|
||||
|
||||
static void gk20a_remove_mm_support(struct mm_gk20a *mm)
|
||||
{
|
||||
gk20a_remove_vm(&mm->bar1.vm, &mm->bar1.inst_block);
|
||||
gk20a_remove_vm(&mm->pmu.vm, &mm->pmu.inst_block);
|
||||
}
|
||||
|
||||
int gk20a_init_mm_setup_sw(struct gk20a *g)
|
||||
{
|
||||
struct mm_gk20a *mm = &g->mm;
|
||||
|
||||
Reference in New Issue
Block a user