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

Commit c33ce85b authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

ipa: set atomic IOMMU domain attr



IPA performs some map/unmap operations from atomic context.  This only
works if the atomic domain attribute is set.  Set it.

Change-Id: I9045850f22fa4a4faa1a0710482bc476efb5e5b8
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent b5eb7138
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3814,6 +3814,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
	int order = 0;
	int result;
	int disable_htw = 1;
	int atomic_ctx = 1;

	IPADBG("sub pdev=%p\n", dev);

@@ -3848,6 +3849,14 @@ static int ipa_smmu_ap_cb_probe(struct device *dev)
		}
	}

	if (iommu_domain_set_attr(cb->mapping->domain,
				  DOMAIN_ATTR_ATOMIC,
				  &atomic_ctx)) {
		IPAERR("couldn't set domain as atomic\n");
		arm_iommu_detach_device(cb->dev);
		return -EIO;
	}

	cb->valid = true;
	smmu_present = true;