[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
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