Problem description:
- gk20a_mm_tlb_invalidate guarantees callers that
TLB would be in a clean state
- gk20a_mm_tlb_invalidate checks whether the dirty
flag is set, then mark clean, then performs
reset operation
- If there are two parallel callers, one thread would be
performing the clean up operation, while the other thread
is returned to the caller
Fix description:
- Extends the duration of the TLB dirty flag mutex lock
Bug
1519537
Change-Id: Ib762d876ea11c06cc39399b1e2607ae3a2c0e17e
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/422820
(cherry picked from commit
dc85d8f4fb08a2a7cc85f8432aee8370b860b73b)
Reviewed-on: http://git-master/r/423806
Reviewed-by: Emad Mir <emir@nvidia.com>
Tested-by: Emad Mir <emir@nvidia.com>
mutex_unlock(&vm->update_gmmu_lock);
return;
}
- vm->tlb_dirty = false;
- mutex_unlock(&vm->update_gmmu_lock);
mutex_lock(&mm->tlb_lock);
do {
"mmu invalidate too many retries");
mutex_unlock(&mm->tlb_lock);
+ vm->tlb_dirty = false;
+ mutex_unlock(&vm->update_gmmu_lock);
}
int gk20a_mm_suspend(struct gk20a *g)