msm: kgsl: Print the correct pid during iommu pagefault
Get the current pagetable being used by the GPU by reading the
pagetable register during iommu pagefault and use that base
address to get the pid of the process corresponding to the
pagetable. Earlier we were using the pagetable address that the
IOMMU driver thinks is presently set for the GPU which may not
always be the case because we change the pagetable used by the
GPU without informing the IOMMU driver.
Change-Id: I7cf788f5d0f9454deb139ed3ad75bb4e750f4772
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index febb265..b3f2d1e 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -82,7 +82,8 @@
return -ENOSYS;
}
- ptbase = iommu_get_pt_base_addr(domain);
+ ptbase = KGSL_IOMMU_GET_IOMMU_REG(iommu_unit->reg_map.hostptr,
+ iommu_dev->ctx_id, TTBR0);
fsr = KGSL_IOMMU_GET_IOMMU_REG(iommu_unit->reg_map.hostptr,
iommu_dev->ctx_id, FSR);