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

Commit 59546732 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Address overlap fix" into msm-4.9

parents 8a4f68db fbd1dd4d
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -4909,20 +4909,16 @@ int ipa_iommu_map(struct iommu_domain *domain,
	IPADBG("domain =0x%p iova 0x%lx\n", domain, iova);
	IPADBG("paddr =0x%pa size 0x%x\n", &paddr, (u32)size);

	/* make sure no overlapping */
	/* Checking the address overlapping */
	if (domain == ipa2_get_smmu_domain()) {
		if (iova >= ap_cb->va_start && iova < ap_cb->va_end) {
			IPAERR("iommu AP overlap addr 0x%lx\n", iova);
			ipa_assert();
			return -EFAULT;
		}
	} else if (domain == ipa2_get_wlan_smmu_domain()) {
		/* wlan is one time map */
	} else if (domain == ipa2_get_uc_smmu_domain()) {
		if (iova >= uc_cb->va_start && iova < uc_cb->va_end) {
			IPAERR("iommu uC overlap addr 0x%lx\n", iova);
			ipa_assert();
			return -EFAULT;
		}
	} else {
		IPAERR("Unexpected domain 0x%p\n", domain);