Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christian Zigotzky
On 04 February 2019 at 01:38PM, Christoph Hellwig wrote: It seems like the pasemi driver fails to set a DMA mask, but seems otherwise 64-bit DMA capable. The old PPC code didn't verify the dma mask during the map operations, but the x86-derived generic code does. This patch just sets the DMA

Re: [PATCH 02/19] dma-iommu: cleanup dma-iommu.h

2019-02-06 Thread Robin Murphy
On 01/02/2019 16:13, Christoph Hellwig wrote: On Fri, Feb 01, 2019 at 02:47:17PM +, Robin Murphy wrote: On 14/01/2019 09:41, Christoph Hellwig wrote: No need for a __KERNEL__ guard outside uapi, make sure we pull in the includes unconditionally so users can rely on it, and add a missing

Re: [PATCH 16/19] dma-iommu: don't depend on CONFIG_DMA_DIRECT_REMAP

2019-02-06 Thread Robin Murphy
On 14/01/2019 09:41, Christoph Hellwig wrote: For entirely dma coherent architectures there is no good reason to ever remap dma coherent allocation. Yes there is, namely assembling large buffers without the need for massive CMA areas and compaction overhead under memory fragmentation. That

Re: [PATCH 18/19] arm64: switch copyright boilerplace to SPDX in dma-mapping.c

2019-02-06 Thread Robin Murphy
On 14/01/2019 09:41, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy --- arch/arm64/mm/dma-mapping.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index

Re: [PATCH 17/19] dma-iommu: switch copyright boilerplace to SPDX

2019-02-06 Thread Robin Murphy
On 14/01/2019 09:41, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy --- drivers/iommu/dma-iommu.c | 13 + include/linux/dma-iommu.h | 13 + 2 files changed, 2 insertions(+), 24 deletions(-) diff --git

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christoph Hellwig
On Wed, Feb 06, 2019 at 02:45:34PM +0100, Christian Zigotzky wrote: > I patched the source code from the Git 'powerpc-dma.6' with your patch > today. Unfortunately the P.A. Semi Ethernet doesn't work with the patched > Git kernel. > > After that I tried it with the patch applied over the working

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christoph Hellwig
On Wed, Feb 06, 2019 at 04:15:05PM +0100, Christoph Hellwig wrote: > The last good one was 29e7e2287e196f48fe5d2a6e017617723ea979bf > ("dma-direct: we might need GFP_DMA for 32-bit dma masks"), if I > remember correctly. powerpc/dma: use the dma_direct mapping routines > was the one that you said

Re: [PATCH 03/19] dma-iommu: don't use a scatterlist in iommu_dma_alloc

2019-02-06 Thread Robin Murphy
On 01/02/2019 16:16, Christoph Hellwig wrote: On Fri, Feb 01, 2019 at 03:24:45PM +, Robin Murphy wrote: On 14/01/2019 09:41, Christoph Hellwig wrote: Directly iterating over the pages makes the code a bit simpler and prepares for the following changes. It also defeats the whole purpose

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-06 Thread Nicolin Chen
Hi Christoph, On Wed, Feb 06, 2019 at 08:07:26AM +0100, Christoph Hellwig wrote: > On Tue, Feb 05, 2019 at 03:05:30PM -0800, Nicolin Chen wrote: > > > And my other concern is that this skips allocating from the per-device > > > pool, which drivers might rely on. > > > > Actually Robin had the

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christian Zigotzky
Hi Christoph, I also didn’t notice the 32-bit DMA mask in your patch. I have to read your patches and descriptions carefully in the future. I will test your new patch at the weekend. Thanks, Christian Sent from my iPhone > On 6. Feb 2019, at 16:16, Christoph Hellwig wrote: > >> On Wed, Feb

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-06 Thread Christoph Hellwig
On Wed, Feb 06, 2019 at 06:28:49PM -0800, Nicolin Chen wrote: > So we will keep allocating single pages in dev->cma_area if it's > present, in order to address your previous concern? Yes. ___ iommu mailing list iommu@lists.linux-foundation.org