Re: dma_sync_*_for_cpu and direction=TO_DEVICE (was Re: [PATCH 02/20] dma-mapping: provide a generic dma-noncoherent implementation)

2018-05-18 Thread Alexey Brodkin
Hi Russel, On Fri, 2018-05-18 at 18:50 +0100, Russell King - ARM Linux wrote: > It's necessary. Take a moment to think carefully about this: > > dma_map_single(, dir) > > dma_sync_single_for_cpu(, dir) > > dma_sync_single_for_device(, dir) > >

Re: arc dma mapping cleanups/fixes and generic noncohernt dma code

2018-05-18 Thread Alexey Brodkin
_misc.git_shortlog_refs_heads_arc-2Ddma=DwIBAg=DPL6_X_6JkXFx7 > AXWqB0tg=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I=QNC0zOG4bRotSxdjQfFXl0dAQJCtnxtF9435wAuJlu0=Wad1ptsFpknoSn0ebr3_QMJn9G_D3eIS-LYMwGfOJ- > I= > > Changes since previous bigger series: > - take the offset into account in n

Re: [PATCH 02/20] dma-mapping: provide a generic dma-noncoherent implementation

2018-05-18 Thread Alexey Brodkin
Hi Christoph, On Fri, 2018-05-18 at 15:27 +0200, h...@lst.de wrote: > On Fri, May 18, 2018 at 01:03:46PM +0000, Alexey Brodkin wrote: > > Note mmc_get_dma_dir() is just "data->flags & MMC_DATA_WRITE ? > > DMA_TO_DEVICE : DMA_FROM_DEVICE". > > I.

Re: [PATCH 02/20] dma-mapping: provide a generic dma-noncoherent implementation

2018-05-18 Thread Alexey Brodkin
Hi Christoph, On Fri, 2018-05-11 at 09:59 +0200, Christoph Hellwig wrote: [snip] There seems to be one subtle issue with map/unmap code. While investigating problems on ARC I added instrumentation as below: >8 ---

Re: [PATCH 03/20] arc: use generic dma_noncoherent_ops

2018-05-11 Thread Alexey Brodkin
Hi Christoph, On Fri, 2018-05-11 at 09:59 +0200, Christoph Hellwig wrote: > Switch to the generic noncoherent direct mapping implementation. > > Signed-off-by: Christoph Hellwig > --- > arch/arc/Kconfig | 4 + > arch/arc/include/asm/Kbuild| 1 + >

dma-mapping: clear harmful GFP_* flags in common code

2018-04-09 Thread Alexey Brodkin
Hello, May we have e89f5b370153 ("dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs") back-ported to 4.16 kernel as it fixes: 57bf5a8 ("dma-mapping: clear harmful GFP_* flags in common code"). For more info about introduced problem see this thread:

Re: dma-mapping: clearing GFP_ZERO flag caused crashes of Ethernet on arc/hsdk board.

2018-03-27 Thread Alexey Brodkin
Hi Andy, On Tue, 2018-03-27 at 21:11 +0300, Andy Shevchenko wrote: > On Tue, Mar 27, 2018 at 8:12 PM, Evgeniy Didin > wrote: > > Hello, > > > > After commit 57bf5a8963f8 ("dma-mapping: clear harmful GFP_* flags in > > common code") we noticed problems with

Re: [PATCH 32/33] cris: use dma-direct

2018-01-10 Thread Alexey Brodkin
Hi Christoph, On Wed, 2018-01-10 at 09:00 +0100, Christoph Hellwig wrote: > cris currently has an incomplete direct mapping dma_map_ops implementation > is PCI support is enabled. Replace it with the fully feature generic _if_ PCI support is enabled. -Alexey