[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170627152242.GB29664@infradead.org>
Date: Tue, 27 Jun 2017 08:22:42 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Robin Murphy <robin.murphy@....com>
Cc: Christoph Hellwig <hch@...radead.org>,
Vladimir Murzin <vladimir.murzin@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux@...linux.org.uk, sza@....hu, arnd@...db.de,
gregkh@...uxfoundation.org, akpm@...ux-foundation.org,
alexandre.torgue@...com, benjamin.gaignard@...aro.org,
kbuild-all@...org, Michal Nazarewicz <mina86@...a86.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH v5 4/7] drivers: dma-coherent: Introduce default DMA pool
On Tue, Jun 27, 2017 at 03:36:16PM +0100, Robin Murphy wrote:
> I admit I'm almost in agreement, were it not for the fact that
> dma-contiguous already supports all four combinations of both per-device
> and global pools, and both reserved mem and direct declarations from
> arch/platform code, all through the same interface to boot, and nobody's
> complaining about that. The only real difference for dma-coherent seems
> to be the way it's baked into the existing API.
>
> If it is just a matter of interfaces, I'd have no objection to exporting
> a separate e.g. dma_alloc_from_global_coherent() or somesuch as a
> conceptually separate interface to dma_coherent_default_memory, which
> the arch code can then call from ->alloc in the same manner they
> currently call dma_alloc_from_contiguous(). That seems like a reasonable
> way to keep the per-device and global pools conceptually distinct
> without needlessly duplicating implementations. In fact, I'm now
> wondering if the regular arm/arm64 atomic pools couldn't also make use
> of such a thing as well...
Ok. I think I'll just go ahead with the current patches, and then
we'll try to come up with something better later. I really don't
want it in actual arch code, but I want it controlled from the
dma_map_ops instance instead of from generic code. There will be
a lot of churn in this area if my plans go ahead, so I think we can
handle it then.
Powered by blists - more mailing lists