[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190522130921.GA26874@lst.de>
Date: Wed, 22 May 2019 15:09:21 +0200
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>
Cc: Christoph Hellwig <hch@....de>,
Horia Geantă <horia.geanta@....com>,
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 Wed, May 22, 2019 at 01:50:47PM +0100, Robin Murphy wrote:
> 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.
Except that the same optimization we are tripping over here is also
present in dma_sync_* - dma_sync_*_to_device with DMA_FROM_DEVICE is a
no-op in swiotlb.
Powered by blists - more mailing lists