[PATCH v3 3/4] arm64: Add IOMMU dma_ops
Catalin Marinas
catalin.marinas at arm.com
Wed Jul 15 09:53:16 PDT 2015
On Wed, Jul 15, 2015 at 05:27:22PM +0100, Robin Murphy wrote:
> On 15/07/15 10:31, Catalin Marinas wrote:
> >On Fri, Jul 10, 2015 at 08:19:34PM +0100, Robin Murphy wrote:
> >>+ 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
More information about the linux-arm-kernel
mailing list