Re: use the generic dma-noncoherent code for sh V2

2018-07-31 Thread Arnd Bergmann
On Fri, Jul 27, 2018 at 6:20 PM, Rob Landley wrote: > On 07/24/2018 03:21 PM, Christoph Hellwig wrote: >> On Tue, Jul 24, 2018 at 02:01:42PM +0200, Christoph Hellwig wrote: >>> Hi all, >>> >>> can you review these patches to switch sh to use the generic >>> dma-noncoherent code? All the

Re: [PATCH 08/20] powerpc/dma: remove the unused dma_nommu_ops export

2018-07-31 Thread Christoph Hellwig
It turns out cxl actually uses it. So for now skip this patch, although random code in drivers messing with dma ops will need to be sorted out sooner or later. ___ iommu mailing list iommu@lists.linux-foundation.org

Re: [PATCH 1/3] hexagon: remove the sync_single_for_cpu DMA operation

2018-07-31 Thread Christoph Hellwig
On Wed, Jul 25, 2018 at 06:39:27AM +0200, Christoph Hellwig wrote: > On Tue, Jul 24, 2018 at 10:29:48PM -0500, Richard Kuo wrote: > > Patch series looks good. Definitely appreciate the cleanup. > > > > I can take it through my tree, or if not: > > > > Acked-by: Richard Kuo > > Please take it

Re: [PATCH] powerpc: do not redefined NEED_DMA_MAP_STATE

2018-07-31 Thread Michael Ellerman
Christoph Hellwig writes: > kernel/dma/Kconfig already defines NEED_DMA_MAP_STATE, just select it > from PPC64 and NOT_COHERENT_CACHE instead. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/Kconfig | 3 --- > arch/powerpc/platforms/Kconfig.cputype | 2 ++ > 2 files

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Bjorn Helgaas
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > There is nothing arch specific about PCI or dma-debug, so move this > call to common code just after registering the bus type. > > Signed-off-by: Christoph Hellwig Applied with acks from Thomas and Michael to pci/misc for

Re: [PATCH v2 0/7] Stop losing firmware-set DMA masks

2018-07-31 Thread Robin Murphy
Hi Arnd, On 29/07/18 13:32, Arnd Bergmann wrote: On Tue, Jul 24, 2018 at 12:16 AM, Robin Murphy wrote: Whilst the common firmware code invoked by dma_configure() initialises devices' DMA masks according to limitations described by the respective properties ("dma-ranges" for OF and _DMA/IORT

Re: use the generic dma-noncoherent code for sh V2

2018-07-31 Thread Arnd Bergmann
On Mon, Jul 30, 2018 at 11:06 AM, Christoph Hellwig wrote: > On Fri, Jul 27, 2018 at 11:20:21AM -0500, Rob Landley wrote: >> Speaking of DMA: > > Which really has nothing to do with the dma mapping code, which > also means I can't help you much unfortunately. > > That being said sh is the last

barriers vs I/O and DMA for ia64

2018-07-31 Thread Christoph Hellwig
Hi all, please review these patches carefully - ia64 currenly seems to be the odd one out in terms of barrier placement for DMA and I/O and this patch tries to resolve it. But I don't have any IA64 hardware nor do I know the architecture to well, so don't blindly trust me.

[PATCH] ia64: fix barrier placement for write* / dma mapping

2018-07-31 Thread Christoph Hellwig
memory-barriers.txt has been updated with the following requirement. "When using writel(), a prior wmb() is not needed to guarantee that the cache coherent memory writes have completed before writing to the MMIO region." The current writeX() and iowriteX() implementations on ia64 are not

Re: use the generic dma-noncoherent code for sh V3

2018-07-31 Thread Christoph Hellwig
On Tue, Jul 31, 2018 at 03:06:13PM +0900, Yoshinori Sato wrote: > On Wed, 25 Jul 2018 18:40:38 +0900, > Christoph Hellwig wrote: > > > > Hi all, > > > > can you review these patches to switch sh to use the generic > > dma-noncoherent code? All the requirements are in mainline already > > and

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Joerg Roedel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote: > [+cc Joerg] > > On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > > There is nothing arch specific about PCI or dma-debug, so move this > > call to common code just after registering the bus type. > > I assume

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Christoph Hellwig
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote: > [+cc Joerg] > > On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote: > > There is nothing arch specific about PCI or dma-debug, so move this > > call to common code just after registering the bus type. > > I assume

Re: use the generic dma-noncoherent code for sh V3

2018-07-31 Thread Yoshinori Sato
On Wed, 25 Jul 2018 18:40:38 +0900, Christoph Hellwig wrote: > > Hi all, > > can you review these patches to switch sh to use the generic > dma-noncoherent code? All the requirements are in mainline already > and we've switched various architectures over to it already. > > Changes since V2: >

[PATCH v3] sparc: use generic dma_noncoherent_ops

2018-07-31 Thread Christoph Hellwig
Switch to the generic noncoherent direct mapping implementation. This removes the previous sync_single_for_device implementation, which looks bogus given that no syncing is happening in the similar but more important map_single case. Signed-off-by: Christoph Hellwig Acked-by: Sam Ravnborg ---

Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code

2018-07-31 Thread Michael Ellerman
Christoph Hellwig writes: > There is nothing arch specific about PCI or dma-debug, so move this > call to common code just after registering the bus type. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/kernel/dma.c | 3 --- > arch/sh/drivers/pci/pci.c | 2 -- >