Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-30 Thread Russell King - ARM Linux
On Thu, Aug 30, 2018 at 10:45:11AM +0200, Linus Walleij wrote: > On Thu, Aug 30, 2018 at 10:40 AM Russell King - ARM Linux > wrote: > > > Well, as I've no idea what the issue is here, I can't do anything or > > make any suggestions. I wasn't copied on the initial part of the > > thread. > > Sor

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-30 Thread Linus Walleij
On Thu, Aug 30, 2018 at 10:40 AM Russell King - ARM Linux wrote: > Well, as I've no idea what the issue is here, I can't do anything or > make any suggestions. I wasn't copied on the initial part of the > thread. Sorry about that, it was because the original patch only hit in drivers/of/*. I w

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-30 Thread Russell King - ARM Linux
On Wed, Aug 29, 2018 at 07:55:21AM +0200, Christoph Hellwig wrote: > On Tue, Aug 28, 2018 at 03:14:14PM +0100, Russell King - ARM Linux wrote: > > But yes, the fundamental fact is that AMBA devices don't have any > > care about the differences between coherent and streaming DMA. The > > distinctio

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-28 Thread Christoph Hellwig
On Tue, Aug 28, 2018 at 03:14:14PM +0100, Russell King - ARM Linux wrote: > But yes, the fundamental fact is that AMBA devices don't have any > care about the differences between coherent and streaming DMA. The > distinction that we make in the kernel is purely a software one when > it comes to th

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-28 Thread Christoph Hellwig
On Tue, Aug 28, 2018 at 03:25:55PM +0200, Linus Walleij wrote: > Do you think we can proceed with this patch or do you want me to > revert the split back? I'll apply this patch (probably with a little common in the source explaining the situation), based on the feedback from you and Russell. > >

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-28 Thread Russell King - ARM Linux
On Tue, Aug 28, 2018 at 03:25:55PM +0200, Linus Walleij wrote: > On Tue, Aug 28, 2018 at 11:21 AM Christoph Hellwig wrote: > > > > + dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > > > + if (!dev->dev.dma_mask) > > > + dev->dev.dma_mask = &dev->dev.coherent_dma_mask; > > > >

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-28 Thread Linus Walleij
On Tue, Aug 28, 2018 at 11:21 AM Christoph Hellwig wrote: > > + dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > > + if (!dev->dev.dma_mask) > > + dev->dev.dma_mask = &dev->dev.coherent_dma_mask; > > We should never set dma_mask to point to the coherent_dma_mask, > as that wil

Re: [PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-28 Thread Christoph Hellwig
> /* setup generic device info */ > + dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > + if (!dev->dev.dma_mask) > + dev->dev.dma_mask = &dev->dev.coherent_dma_mask; We should never set dma_mask to point to the coherent_dma_mask, as that will cause problems with devices t

[PATCH] of/platform: Initialise AMBA default DMA masks

2018-08-28 Thread Linus Walleij
commit a5516219b102 ("of/platform: Initialise default DMA masks") sets up the coherent_dma_mask of platform devices created from the device tree, but fails to do the same for AMBA (PrimeCell) devices. This leads to a regression in kernel v4.19-rc1 triggering the WARN_ONCE() in kernel/dma/coherent.