Thread (11 messages) 11 messages, 3 authors, 2015-07-15
DORMANTno replies
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 current
  19. v4 [diff vs current]
  20. v4 [diff vs current]
  21. v5 [diff vs current]
  22. v5 [diff vs current]
  23. v6 [diff vs current]

[PATCH v3 3/4] arm64: Add IOMMU dma_ops

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2015-07-15 16:53:16
Also in: linux-iommu

On Wed, Jul 15, 2015 at 05:27:22PM +0100, Robin Murphy wrote:
On 15/07/15 10:31, Catalin Marinas wrote:
quoted
On Fri, Jul 10, 2015 at 08:19:34PM +0100, Robin Murphy wrote:
quoted
+			if (iommu_dma_mapping_error(dev, *handle)) {
+				if (coherent)
+					__free_pages(page, get_order(size));
+				else
+					__free_from_pool(addr, size);
+				addr = NULL;
+			}
+		}
+	}
+	return addr;
+}
In the second case here (!__GFP_WAIT), do we do any cache maintenance? I
can't see it and it's needed for the !coherent case.
In the atomic non-coherent case, we're stealing from the atomic pool, so
addr is already a non-cacheable alias (and alloc_from_pool does memset(0)
through that). That shouldn't need anything extra, right?
You are right, we already flushed the cache for the atomic pool when we
allocated it in atomic_pool_init().

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