iommu: msm: Refactor use of remote spinlock
The remote spinlock was originally meant to synchronize access between
GPU and CPU accessing SMMU. However, there are more use cases that
this remote spinlock serves. This change decouples the spinlock from
GPU and adds support for taking the spinlock only for SMMUs that are
specified in the device tree.
CRs-fixed: 517873
Change-Id: Ic50992d0d1a102fbd05855e09e254e627f99ec33
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
diff --git a/drivers/iommu/msm_iommu_perfmon-v1.c b/drivers/iommu/msm_iommu_perfmon-v1.c
index 7d6dd34..2b55184 100644
--- a/drivers/iommu/msm_iommu_perfmon-v1.c
+++ b/drivers/iommu/msm_iommu_perfmon-v1.c
@@ -151,9 +151,9 @@
goto out;
}
- iommu->ops->iommu_lock_acquire();
+ iommu->ops->iommu_lock_acquire(0);
iommu_pm_check_for_overflow(pmon);
- iommu->ops->iommu_lock_release();
+ iommu->ops->iommu_lock_release(0);
mutex_unlock(&pmon->lock);