Thread (20 messages) 20 messages, 6 authors, 2015-09-22
STALE3916d
Revisions (23)
  1. rfc [diff vs current]
  2. rfc [diff vs current]
  3. rfc [diff vs current]
  4. rfc [diff vs current]
  5. rfc [diff vs current]
  6. rfc [diff vs current]
  7. v2 [diff vs current]
  8. v2 [diff vs current]
  9. v2 [diff vs current]
  10. v1 [diff vs current]
  11. v1 [diff vs current]
  12. v2 [diff vs current]
  13. v1 [diff vs current]
  14. v2 [diff vs current]
  15. v3 [diff vs current]
  16. v3 [diff vs current]
  17. v3 [diff vs current]
  18. v3 [diff vs current]
  19. v4 [diff vs current]
  20. v4 [diff vs current]
  21. v5 [diff vs current]
  22. v5 current
  23. v6 [diff vs current]

[PATCH v5 3/3] arm64: Hook up IOMMU dma_ops

From: joro@8bytes.org (Joerg Roedel)
Date: 2015-08-07 08:55:17
Also in: linux-iommu

On Fri, Jul 31, 2015 at 06:18:29PM +0100, Robin Murphy wrote:
+void arch_teardown_dma_ops(struct device *dev)
+{
+	struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
+
+	if (domain) {
+		iommu_detach_device(domain, dev);
+		if (domain->type & __IOMMU_DOMAIN_ARM64_IOVA)
+			iommu_put_dma_cookie(domain);
+		if (domain->type & __IOMMU_DOMAIN_ARM64)
+			iommu_domain_free(domain);
+		dev->archdata.dma_ops = NULL;
+	}
+}
When is this called? In case a device gets removed the IOMMU core and
driver should take care of destroying the domain, at least when its a
default-domain. This is part of the iommu-group handling.


	Joerg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help