Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-09 Thread Arvind Sankar
On Wed, Oct 09, 2019 at 08:50:43AM +0200, Christoph Hellwig wrote: > On Tue, Oct 08, 2019 at 11:47:31AM -0400, Arvind Sankar wrote: > > Ok, I see that almost nothing actually uses dma_get_required_mask. So if > > something did need >4Gb space, the IOMMU would allocate it anyway > > regardless of

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-09 Thread Christoph Hellwig
On Tue, Oct 08, 2019 at 11:47:31AM -0400, Arvind Sankar wrote: > Ok, I see that almost nothing actually uses dma_get_required_mask. So if > something did need >4Gb space, the IOMMU would allocate it anyway > regardless of dma_get_required_mask. Yes. And with the direct mapping it also isn't an

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-08 Thread Arvind Sankar
On Tue, Oct 08, 2019 at 07:51:03AM -0400, Arvind Sankar wrote: > On Tue, Oct 08, 2019 at 09:32:10AM +0200, Christoph Hellwig wrote: > > On Mon, Oct 07, 2019 at 07:54:02PM -0400, Arvind Sankar wrote: > > > > Do you want me to resend the patch as its own mail, or do you just take > > > > it with a

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-08 Thread Christoph Hellwig
On Tue, Oct 08, 2019 at 07:51:03AM -0400, Arvind Sankar wrote: > What I mean is, do there exist devices (which would necessarily support > 64-bit DMA) that want to DMA using bigger than 4Gb buffers. Eg a GPU > accelerator card with 16Gb of RAM on-board that wants to map 6Gb for DMA > in one go, or

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-08 Thread Arvind Sankar
On Tue, Oct 08, 2019 at 09:32:10AM +0200, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 07:54:02PM -0400, Arvind Sankar wrote: > > > Do you want me to resend the patch as its own mail, or do you just take > > > it with a Tested-by: from me? If the former, I assume you're ok with me > > >

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-08 Thread Christoph Hellwig
On Mon, Oct 07, 2019 at 07:54:02PM -0400, Arvind Sankar wrote: > > Do you want me to resend the patch as its own mail, or do you just take > > it with a Tested-by: from me? If the former, I assume you're ok with me > > adding your Signed-off-by? > > > > Thanks > > A question on the original

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-08 Thread Christoph Hellwig
On Mon, Oct 07, 2019 at 06:10:55PM -0400, Arvind Sankar wrote: > > Acked-by: Christoph Hellwig > > Do you want me to resend the patch as its own mail, or do you just take > it with a Tested-by: from me? If the former, I assume you're ok with me > adding your Signed-off-by? Either way is fine

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Arvind Sankar
On Mon, Oct 07, 2019 at 06:10:55PM -0400, Arvind Sankar wrote: > On Mon, Oct 07, 2019 at 08:47:54PM +0200, Christoph Hellwig wrote: > > On Mon, Oct 07, 2019 at 02:32:07PM -0400, Arvind Sankar wrote: > > > On Mon, Oct 07, 2019 at 01:58:57PM -0400, Arvind Sankar wrote: > > > > On Mon, Oct 07, 2019

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Arvind Sankar
On Mon, Oct 07, 2019 at 08:47:54PM +0200, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 02:32:07PM -0400, Arvind Sankar wrote: > > On Mon, Oct 07, 2019 at 01:58:57PM -0400, Arvind Sankar wrote: > > > On Mon, Oct 07, 2019 at 10:56:30AM -0700, Christoph Hellwig wrote: > > > > On Mon, Oct 07,

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Christoph Hellwig
On Mon, Oct 07, 2019 at 02:32:07PM -0400, Arvind Sankar wrote: > On Mon, Oct 07, 2019 at 01:58:57PM -0400, Arvind Sankar wrote: > > On Mon, Oct 07, 2019 at 10:56:30AM -0700, Christoph Hellwig wrote: > > > On Mon, Oct 07, 2019 at 07:55:28PM +0200, Christoph Hellwig wrote: > > > > On Mon, Oct 07,

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Arvind Sankar
On Mon, Oct 07, 2019 at 01:58:57PM -0400, Arvind Sankar wrote: > On Mon, Oct 07, 2019 at 10:56:30AM -0700, Christoph Hellwig wrote: > > On Mon, Oct 07, 2019 at 07:55:28PM +0200, Christoph Hellwig wrote: > > > On Mon, Oct 07, 2019 at 01:54:32PM -0400, Arvind Sankar wrote: > > > > It doesn't boot

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Arvind Sankar
On Mon, Oct 07, 2019 at 10:56:30AM -0700, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 07:55:28PM +0200, Christoph Hellwig wrote: > > On Mon, Oct 07, 2019 at 01:54:32PM -0400, Arvind Sankar wrote: > > > It doesn't boot with the patch. Won't it go > > > dma_get_required_mask > > > ->

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Christoph Hellwig
On Mon, Oct 07, 2019 at 07:55:28PM +0200, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 01:54:32PM -0400, Arvind Sankar wrote: > > It doesn't boot with the patch. Won't it go > > dma_get_required_mask > > -> intel_get_required_mask > > -> iommu_need_mapping > > ->

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Christoph Hellwig
On Mon, Oct 07, 2019 at 01:54:32PM -0400, Arvind Sankar wrote: > It doesn't boot with the patch. Won't it go > dma_get_required_mask > -> intel_get_required_mask > -> iommu_need_mapping > -> dma_get_required_mask > ? > > Should the call to dma_get_required_mask in

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Arvind Sankar
On Mon, Oct 07, 2019 at 09:34:48AM +0200, Christoph Hellwig wrote: > Hi Arvind, > > can you try the patch below? > > > diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c > index 3f974919d3bd..52b709bf2b55 100644 > --- a/drivers/iommu/intel-iommu.c > +++

Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-07 Thread Christoph Hellwig
Hi Arvind, can you try the patch below? diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3f974919d3bd..52b709bf2b55 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3775,6 +3775,13 @@ static int intel_map_sg(struct device *dev, struct

ehci-pci breakage with dma-mapping changes in 5.4-rc2

2019-10-06 Thread Arvind Sankar
Hi, Commit 249baa547901 ("dma-mapping: provide a better default ->get_required_mask") causes an error on ehci-pci for me. Either reverting the commit or disabling iommu=pt seems to fix this. [9.81] usb 1-1: new high-speed USB device number 2 using ehci-pci [9.000755] ehci-pci