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

Commit a08c3f6c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Only attach to the IOMMU after setting all domain attrs"

parents e210d32f b2c96377
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -3917,22 +3917,22 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
		return -EPROBE_DEFER;
	}

	ret = arm_iommu_attach_device(cb->dev, cb->mapping);
	if (ret) {
		IPAERR("could not attach device ret=%d\n", ret);
		return ret;
	}

	if (smmu_disable_htw) {
		if (iommu_domain_set_attr(cb->mapping->domain,
				DOMAIN_ATTR_COHERENT_HTW_DISABLE,
				 &disable_htw)) {
			IPAERR("couldn't disable coherent HTW\n");
			arm_iommu_detach_device(cb->dev);
			return -EIO;
		}
	}


	ret = arm_iommu_attach_device(cb->dev, cb->mapping);
	if (ret) {
		IPAERR("could not attach device ret=%d\n", ret);
		return ret;
	}

	cb->valid = true;
	cb->next_addr = IPA_SMMU_UC_VA_END;
	ipa_ctx->uc_pdev = dev;
+7 −7
Original line number Diff line number Diff line
@@ -4028,22 +4028,22 @@ static int ipa_smmu_uc_cb_probe(struct device *dev)
		return -EPROBE_DEFER;
	}

	ret = ipa3_arm_iommu_attach_device(cb->dev, cb->mapping);
	if (ret) {
		IPAERR("could not attach device ret=%d\n", ret);
		return ret;
	}

	if (smmu_disable_htw) {
		if (iommu_domain_set_attr(cb->mapping->domain,
				DOMAIN_ATTR_COHERENT_HTW_DISABLE,
				 &disable_htw)) {
			IPAERR("couldn't disable coherent HTW\n");
			ipa3_arm_iommu_detach_device(cb->dev);
			return -EIO;
		}
	}


	ret = ipa3_arm_iommu_attach_device(cb->dev, cb->mapping);
	if (ret) {
		IPAERR("could not attach device ret=%d\n", ret);
		return ret;
	}

	cb->valid = true;
	cb->next_addr = IPA_SMMU_UC_VA_END;
	ipa3_ctx->uc_pdev = dev;