Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e15c568 authored by Olav Haugan's avatar Olav Haugan
Browse files

iommu: msm: Move location of local iommu halt



During iommu detach we do a local iommu halt to ensure certain
registers are atomically updated. However, the local iommu halt
is taken at a larger scope than needed. Reduce the scope of this
halt. This will help with performance when detaching a context bank
from an iommu that has another context bank in use.

Change-Id: Id7630bd73a71d38ee987bd0f19cc8e06c725a7c1
Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
parent 22b9645b
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -899,16 +899,15 @@ static void msm_iommu_detach_dev(struct iommu_domain *domain,
	iommu_drvdata->asid[ctx_drvdata->asid - 1]--;
	ctx_drvdata->asid = -1;

	iommu_halt(iommu_drvdata);

	__reset_context(iommu_drvdata->cb_base, ctx_drvdata->num);

	/*
	 * Only reset the M2V tables on the very last detach */
	if (!is_secure && iommu_drvdata->ctx_attach_count == 1)
	if (!is_secure && iommu_drvdata->ctx_attach_count == 1) {
		iommu_halt(iommu_drvdata);
		__release_smg(iommu_drvdata->base);

		iommu_resume(iommu_drvdata);
	}

	__disable_clocks(iommu_drvdata);