[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cbe5470-16a6-17e9-337d-6ba18b16b6e8@arm.com>
Date: Wed, 22 May 2019 13:50:47 +0100
From: Robin Murphy <robin.murphy@....com>
To: Christoph Hellwig <hch@....de>,
Horia Geantă <horia.geanta@....com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
linux-imx@....com
Subject: Re: [PATCH] swiotlb: sync buffer when mapping FROM_DEVICE
On 22/05/2019 13:32, Christoph Hellwig wrote:
> I'm a little worried about this. While it looks functionally correct
> we have surived without it, and doing another copy for every swiotlb
> dma mapping from the device looks extremely painful for the typical use
> cases where we expect the device to transfer the whole mapping.
>
> I'd be tempted to instead properl document the current behavior and
> introduce a new DMA_ATTR_PARTIAL flag to allow for partial mappings.
Would that work out any different from the existing
DMA_ATTR_SKIP_CPU_SYNC? If drivers are prepared to handle this issue
from their end, they can already do so for single mappings by using that
attr along with explicit partial syncs via dma_sync_single(). For
page/sg mappings we'd still have the problem of identifying what part of
"partial" actually matters, and probably having to add some additional
new sync operations to cope.
Robin.
Powered by blists - more mailing lists