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

Commit 2e3dd4fd authored by Chintan Pandya's avatar Chintan Pandya
Browse files

iommu: msm: do tight polling for TLBSTATUS checking



Delay of 50us between successive TLBSTATUS check is too
huge when we call map/unmap quite frequently. This reduces
the performance. So instead use very minimal delay (1us)
between 2 successive checks.

Change-Id: Iaa7d9d2bae93bd7004a1f42e8d2936f28f8f11a8
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
parent d4bc64ea
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -355,8 +355,10 @@ static void __sync_tlb(struct msm_iommu_drvdata *iommu_drvdata, int ctx,
	SET_TLBSYNC(base, ctx, 0);
	/* No barrier needed due to read dependency */

	res = readl_poll_timeout_atomic(CTX_REG(CB_TLBSTATUS, base, ctx), val,
				(val & CB_TLBSTATUS_SACTIVE) == 0, 10000, 50);
	res = readl_relaxed_poll_timeout_atomic(
			CTX_REG(CB_TLBSTATUS, base, ctx),
			val, (val & CB_TLBSTATUS_SACTIVE) == 0,
			1, 500000);
	if (res)
		check_tlb_sync_state(iommu_drvdata, ctx, priv);
}