Re: [PATCH 1/4] dma-mapping: add a new dma_need_sync API

2020-07-07 Thread Christoph Hellwig
On Tue, Jul 07, 2020 at 08:11:09AM -0700, Jonathan Lemon wrote: > > You need to check every mapping. E.g. this API pairs with a > > dma_map_single/page call. For S/G mappings you'd need to call it for > > each entry, although if you have a use case for that we really should > > add a dma_sg_need_

Re: [PATCH 1/4] dma-mapping: add a new dma_need_sync API

2020-07-07 Thread Jonathan Lemon
On Tue, Jul 07, 2020 at 08:47:30AM +0200, Christoph Hellwig wrote: > On Mon, Jul 06, 2020 at 12:42:27PM -0700, Jonathan Lemon wrote: > > On Mon, Jun 29, 2020 at 03:03:56PM +0200, Christoph Hellwig wrote: > > > Add a new API to check if calls to dma_sync_single_for_{device,cpu} are > > > required fo

Re: [PATCH 1/4] dma-mapping: add a new dma_need_sync API

2020-07-06 Thread Christoph Hellwig
On Mon, Jul 06, 2020 at 12:42:27PM -0700, Jonathan Lemon wrote: > On Mon, Jun 29, 2020 at 03:03:56PM +0200, Christoph Hellwig wrote: > > Add a new API to check if calls to dma_sync_single_for_{device,cpu} are > > required for a given DMA streaming mapping. > > > > +:: > > + > > + bool > > + dm

Re: [PATCH 1/4] dma-mapping: add a new dma_need_sync API

2020-07-06 Thread Jonathan Lemon
On Mon, Jun 29, 2020 at 03:03:56PM +0200, Christoph Hellwig wrote: > Add a new API to check if calls to dma_sync_single_for_{device,cpu} are > required for a given DMA streaming mapping. > > +:: > + > + bool > + dma_need_sync(struct device *dev, dma_addr_t dma_addr); > + > +Returns %true i