Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-29 Thread Arnd Bergmann
On Monday 28 March 2016 14:29:29 Konrad Rzeszutek Wilk wrote: > > diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c > > index ada00c3..8c0f66b 100644 > > --- a/arch/arm64/mm/dma-mapping.c > > +++ b/arch/arm64/mm/dma-mapping.c > > @@ -29,6 +29,14 @@ > > > > #include > > > > +/

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-29 Thread Stefano Stabellini
On Mon, 28 Mar 2016, Konrad Rzeszutek Wilk wrote: > On Fri, Mar 18, 2016 at 11:00 AM, Sinan Kaya wrote: > > On 3/18/2016 8:12 AM, Robin Murphy wrote: > >> Since we know for sure that swiotlb_to_phys is a no-op on arm64, it might > >> be cleaner to simply not reference it at all. I suppose we coul

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-29 Thread Sinan Kaya
On 3/29/2016 8:44 AM, Stefano Stabellini wrote: > Could you please explain what is the problem that you are trying to > solve? In other words, what is the issue with assuming that physical > address = dma address (and the current dma_to_phys and phys_to_dma > static inlines) if no arm64 platforms v

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-28 Thread Konrad Rzeszutek Wilk
On Fri, Mar 18, 2016 at 11:00 AM, Sinan Kaya wrote: > On 3/18/2016 8:12 AM, Robin Murphy wrote: >> Since we know for sure that swiotlb_to_phys is a no-op on arm64, it might be >> cleaner to simply not reference it at all. I suppose we could have some >> private local wrappers, e.g.: >> >> #defin

[PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-19 Thread Sinan Kaya
Prefixing dma_to_phys and phys_to_dma API with swiotlb so that they are no longer part of the DMA API. These APIs do not exist on all architectures and breaks compatibility. In preparation for the clean up, also make the ARCH implementation known by defining swiotlb_phys_do_dma and swiotlb_dma_to_

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-19 Thread Sinan Kaya
On 3/18/2016 8:12 AM, Robin Murphy wrote: > Since we know for sure that swiotlb_to_phys is a no-op on arm64, it might be > cleaner to simply not reference it at all. I suppose we could have some > private local wrappers, e.g.: > > #define swiotlb_to_virt(addr) phys_to_virt((phys_addr_t)(addr)) >

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-18 Thread Robin Murphy
On 17/03/16 22:02, Sinan Kaya wrote: Prefixing dma_to_phys and phys_to_dma API with swiotlb so that they are no longer part of the DMA API. These APIs do not exist on all architectures and breaks compatibility. In preparation for the clean up, also make the ARCH implementation known by defining