Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-04-26 Thread Niklas Söderlund
Hi Christoph, On 2016-04-25 12:10:04 -0700, Christoph Hellwig wrote: > On Mon, Apr 25, 2016 at 04:26:19PM +0200, Niklas S?derlund wrote: > > I have followed the call path from the usage in > > drivers/dma/sh/rcar-dmac.c and made sure the dma_addr_t is not used in a > > bad way. > > The

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-04-25 Thread Christoph Hellwig
On Mon, Apr 25, 2016 at 04:26:19PM +0200, Niklas S?derlund wrote: > I have followed the call path from the usage in > drivers/dma/sh/rcar-dmac.c and made sure the dma_addr_t is not used in a > bad way. The dma-debug routines are called from the generic code in include/linux/dma-mapping.h, and

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-04-25 Thread Niklas Söderlund
Hi Christoph, On 2016-04-21 06:49:42 -0700, Christoph Hellwig wrote: > On Wed, Apr 13, 2016 at 03:29:17PM +0200, Niklas S?derlund wrote: > > > Yes, it would be good to do an audit of all the ARM dma_ops as well > > > as generic code like drivers/base/dma-*.c, lib/dma-debug.c and > > >

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-21 Thread Christoph Hellwig
On Thu, Mar 17, 2016 at 01:33:51PM +0200, Laurent Pinchart wrote: > The good news is that, given that no code uses this new API at the moment, > there isn't much to audit. The patch series implements the resource mapping > for arch/arm only, and makes use of it in the rcar-dmac driver only.

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-19 Thread Laurent Pinchart
Hello, On Tuesday 15 March 2016 01:22:54 Christoph Hellwig wrote: > On Fri, Mar 11, 2016 at 01:58:46PM +0100, Niklas S?derlund wrote: > > Without an IOMMU this is easy since the phys_addr_t and dma_addr_t are > > the same and no special care is needed. However if you have a IOMMU you > > need to

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-15 Thread Christoph Hellwig
On Fri, Mar 11, 2016 at 01:58:46PM +0100, Niklas S?derlund wrote: > Without an IOMMU this is easy since the phys_addr_t and dma_addr_t are > the same and no special care is needed. However if you have a IOMMU you > need to map the DMA slave phys_addr_t to a dma_addr_t using something > like

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-11 Thread Dan Williams
On Fri, Mar 11, 2016 at 5:46 AM, Robin Murphy wrote: > Hi Dan, > > > On 11/03/16 06:47, Dan Williams wrote: >> >> On Thu, Mar 10, 2016 at 8:05 AM, Niklas S??derlund >> wrote: >>> >>> Hi Christoph, >>> >>> On 2016-03-07 23:38:47 -0800,

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-11 Thread Robin Murphy
Hi Dan, On 11/03/16 06:47, Dan Williams wrote: On Thu, Mar 10, 2016 at 8:05 AM, Niklas S??derlund wrote: Hi Christoph, On 2016-03-07 23:38:47 -0800, Christoph Hellwig wrote: Please add some documentation on where/how this should be used. It's not a very

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-11 Thread Niklas Söderlund
Hi all, Thanks for your comments. On 2016-03-11 03:15:22 -0800, Christoph Hellwig wrote: > On Thu, Mar 10, 2016 at 10:47:10PM -0800, Dan Williams wrote: > > I think it is confusing to use the dma_ prefix for this peer-to-peer > > mmio functionality. dma_addr_t is a device's view of host memory.

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-11 Thread Christoph Hellwig
On Thu, Mar 10, 2016 at 10:47:10PM -0800, Dan Williams wrote: > I think it is confusing to use the dma_ prefix for this peer-to-peer > mmio functionality. dma_addr_t is a device's view of host memory. > Something like bus_addr_t bus_map_resource(). Doesn't this routine > also need the source

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-10 Thread Dan Williams
On Thu, Mar 10, 2016 at 8:05 AM, Niklas S??derlund wrote: > Hi Christoph, > > On 2016-03-07 23:38:47 -0800, Christoph Hellwig wrote: >> Please add some documentation on where/how this should be used. It's >> not a very obvious interface. > > Good idea, I have added

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-10 Thread Vinod Koul
On Thu, Mar 10, 2016 at 05:05:23PM +0100, Niklas S??derlund wrote: > Hi Christoph, > > On 2016-03-07 23:38:47 -0800, Christoph Hellwig wrote: > > Please add some documentation on where/how this should be used. It's > > not a very obvious interface. > > Good idea, I have added the following to

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-10 Thread Niklas S??derlund
Hi Christoph, On 2016-03-07 23:38:47 -0800, Christoph Hellwig wrote: > Please add some documentation on where/how this should be used. It's > not a very obvious interface. Good idea, I have added the following to Documentation/DMA-API.txt and folded it in to this patch. Do you feel it's

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-07 Thread Christoph Hellwig
Please add some documentation on where/how this should be used. It's not a very obvious interface. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu