[PATCH 1/3] driver core: initialize a default DMA mask for platform device

2018-08-28 Thread Christoph Hellwig
We still treat devices without a DMA mask as defaulting to 32-bits for both mask, but a few releases ago we've started warning about such cases, as they require special cases to work around this sloppyness. Add a dma_mask field to struct platform_object so that we can initialize the dma_mask pointe

various dma_mask fixups

2018-08-28 Thread Christoph Hellwig
Fix warnings and regressions from requiring a dma mask. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH 3/3] of/platform: initialise AMBA default DMA masks

2018-08-28 Thread Christoph Hellwig
From: 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_ON_ONCE(

[PATCH 2/3] sparc: set a default 32-bit dma mask for OF devices

2018-08-28 Thread Christoph Hellwig
This keeps the historic default behavior for devices without a DMA mask, but removes the warning about a lacking DMA mask for doing DMA without a mask. Reported-by: Meelis Roos Tested-by: Meelis Roos Signed-off-by: Christoph Hellwig --- arch/sparc/kernel/of_device_32.c | 5 + arch/sparc/ke

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: new SBus related DMA warnings in 4.18+git

2018-08-28 Thread Christoph Hellwig
On Wed, Aug 29, 2018 at 08:47:04AM +0300, Meelis Roos wrote: > > Updated version including that has survived contact with a sparc cross > > compiler below. Note that this is on top of the previous patch adding > > a dma_mask to struct platform_device, which I've included as well. > > Works comple

Re: new SBus related DMA warnings in 4.18+git

2018-08-28 Thread Meelis Roos
> Updated version including that has survived contact with a sparc cross > compiler below. Note that this is on top of the previous patch adding > a dma_mask to struct platform_device, which I've included as well. Works completely fine on both Ultra 1 and Ultra 2 - nothing DMA-relaated in dmesg.

Re: [Patch v15 4/5] dt-bindings: arm-smmu: Add bindings for qcom,smmu-v2

2018-08-28 Thread Rob Herring
On Mon, Aug 27, 2018 at 04:25:50PM +0530, Vivek Gautam wrote: > Add bindings doc for Qcom's smmu-v2 implementation. > > Signed-off-by: Vivek Gautam > Reviewed-by: Tomasz Figa > Tested-by: Srinivas Kandagatla > --- > > Changes since v14: > - This is a new patch added in v15 after noticing the

Re: [PATCH v5 01/23] iommu: introduce bind_pasid_table API function

2018-08-28 Thread Jacob Pan
On Fri, 24 Aug 2018 15:20:08 +0200 Auger Eric wrote: > Hi Yi Liu, > > On 08/24/2018 02:47 PM, Liu, Yi L wrote: > > Hi Eric, > > > >> From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > >> boun...@lists.linux-foundation.org] On Behalf Of Auger Eric > >> Sent: Friday, August 24, 201

Re: [PATCH v5 01/23] iommu: introduce bind_pasid_table API function

2018-08-28 Thread Jacob Pan
On Tue, 28 Aug 2018 10:34:19 +0200 Auger Eric wrote: > > Anyway, for the new VT-d 3.0 spec. we no longer need this API. In > > stead, I will introduce bind_guest_pasid() API, where per device > > PASID table is allocated by the host. > > So what is the exact state of this series? Is it outdate

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 v3 06/19] dt-bindings: memory: tegra: Squash tegra20-gart into tegra20-mc

2018-08-28 Thread Dmitry Osipenko
On 28.08.2018 13:47, Thierry Reding wrote: > On Mon, Aug 20, 2018 at 10:35:54PM +0300, Dmitry Osipenko wrote: >> On 20.08.2018 22:27, Dmitry Osipenko wrote: >>> On 20.08.2018 22:12, Rob Herring wrote: On Sat, Aug 18, 2018 at 06:54:17PM +0300, Dmitry Osipenko wrote: > Splitting GART and Mem

Re: new SBus related DMA warnings in 4.18+git

2018-08-28 Thread Christoph Hellwig
Updated version including that has survived contact with a sparc cross compiler below. Note that this is on top of the previous patch adding a dma_mask to struct platform_device, which I've included as well. >From e22d27b9bf48c0e3d6eb106f596972c9357ed24d Mon Sep 17 00:00:00 2001 From: Christoph He

Re: [PATCH v3 06/19] dt-bindings: memory: tegra: Squash tegra20-gart into tegra20-mc

2018-08-28 Thread Thierry Reding
On Mon, Aug 20, 2018 at 10:35:54PM +0300, Dmitry Osipenko wrote: > On 20.08.2018 22:27, Dmitry Osipenko wrote: > > On 20.08.2018 22:12, Rob Herring wrote: > >> On Sat, Aug 18, 2018 at 06:54:17PM +0300, Dmitry Osipenko wrote: > >>> Splitting GART and Memory Controller wasn't a good decision that was

Re: new SBus related DMA warnings in 4.18+git

2018-08-28 Thread Meelis Roos
> Based on the other thread here is a new attempt: CC arch/sparc/kernel/of_device_64.o arch/sparc/kernel/of_device_64.c: In function ‘scan_one_device’: arch/sparc/kernel/of_device_64.c:678:2: error: implicit declaration of function ‘DMA_BIT_MASK’ [-Werror=implicit-function-declaration] o

Re: new SBus related DMA warnings in 4.18+git

2018-08-28 Thread Christoph Hellwig
On Mon, Aug 27, 2018 at 10:04:58PM +0300, Meelis Roos wrote: > > On Sun, Aug 26, 2018 at 10:48:44AM +0300, Meelis Roos wrote: > > > Tried yesterdays git 4.18.0-12789-gaa5b105 on a Sun Ultra 1 with SBus > > > and several SBus connected devicess give DMA mapping related warnings: > > > > This shoul

Re: new SBus related DMA warnings in 4.18+git

2018-08-28 Thread Christoph Hellwig
On Mon, Aug 27, 2018 at 01:41:36PM -0700, David Miller wrote: > From: Sam Ravnborg > Date: Mon, 27 Aug 2018 21:15:18 +0200 > > > Why not fix the drivers rather than papering over the fact > > that they are missing the DMA mask? > > > > We are in the lucky situation the Meelis can test any patche

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.

Re: [PATCH v5 01/23] iommu: introduce bind_pasid_table API function

2018-08-28 Thread Auger Eric
Hi Jacob, On 08/28/2018 07:14 AM, Jacob Pan wrote: > On Fri, 24 Aug 2018 17:00:51 +0200 > Auger Eric wrote: > >> Hi Jacob, >> >> On 05/11/2018 10:53 PM, Jacob Pan wrote: >>> Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) >>> use in the guest: >>> https://lists.gnu.org/archive/

[PATCH 1/1] swiotlb: fix comment on swiotlb_bounce()

2018-08-28 Thread Dongli Zhang
Fix the comment as swiotlb_bounce() is used to copy from original dma location to swiotlb buffer during swiotlb_tbl_map_single(), while to copy from swiotlb buffer to original dma location during swiotlb_tbl_unmap_single(). Signed-off-by: Dongli Zhang --- kernel/dma/swiotlb.c | 2 +- 1 file chan

Re: [PATCH 4/5] iommu/arm-smmu: Make way to add Qcom's smmu-500 errata handling

2018-08-28 Thread Vivek Gautam
Hi Robin, On 8/14/2018 10:29 PM, Robin Murphy wrote: On 14/08/18 11:55, Vivek Gautam wrote: Cleanup to re-use some of the stuff Signed-off-by: Vivek Gautam ---   drivers/iommu/arm-smmu.c | 32 +---   1 file changed, 25 insertions(+), 7 deletions(-) I think the ov