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

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

Merge "arm64: dma-mapping: don't clear dma ops on bypass detach"

parents 4cffd968 7debeac5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2147,7 +2147,7 @@ EXPORT_SYMBOL(arm_iommu_attach_device);
void arm_iommu_detach_device(struct device *dev)
{
	struct dma_iommu_mapping *mapping;
	int is_fast;
	int is_fast, s1_bypass = 0;

	mapping = to_dma_iommu_mapping(dev);
	if (!mapping) {
@@ -2161,9 +2161,13 @@ void arm_iommu_detach_device(struct device *dev)
		return;
	}

	iommu_domain_get_attr(mapping->domain, DOMAIN_ATTR_S1_BYPASS,
					&s1_bypass);

	iommu_detach_device(mapping->domain, dev);
	kref_put(&mapping->kref, release_iommu_mapping);
	dev->archdata.mapping = NULL;
	if (!s1_bypass)
		set_dma_ops(dev, NULL);

	pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev));