RE: PCIe host controller behind IOMMU on ARM

2015-11-13 Thread Phil Edworthy
On 13 November 2015 14:00, Arnd Bergmann wrote: > On Friday 13 November 2015 13:03:11 Phil Edworthy wrote: > > > > > > Then pci_device_add() sets the devices coherent_dma_mask to 4GiB > before > > > > calling of_pci_dma_configure(). I assume it does this on the basis that > > > > this is > a > > >

Re: PCIe host controller behind IOMMU on ARM

2015-11-13 Thread Arnd Bergmann
On Friday 13 November 2015 13:03:11 Phil Edworthy wrote: > > > > Then pci_device_add() sets the devices coherent_dma_mask to 4GiB before > > > calling of_pci_dma_configure(). I assume it does this on the basis that > > > this is a > > > good default for PCI drivers that don't call dma_set_mask().

RE: PCIe host controller behind IOMMU on ARM

2015-11-13 Thread Phil Edworthy
Hi Arnd, On 12 November 2015 16:17, Arnd Bergmann wrote: > On Thursday 12 November 2015 15:33:41 Phil Edworthy wrote: > > On 12 November 2015 09:49, Arnd Bergmann wrote: > > > On Thursday 12 November 2015 09:26:33 Phil Edworthy wrote: > > > > On 11 November 2015 18:25, LIviu wrote: > > > > > On Mo

Re: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread Arnd Bergmann
On Thursday 12 November 2015 15:33:41 Phil Edworthy wrote: > On 12 November 2015 09:49, Arnd Bergmann wrote: > > On Thursday 12 November 2015 09:26:33 Phil Edworthy wrote: > > > On 11 November 2015 18:25, LIviu wrote: > > > > On Mon, Nov 09, 2015 at 12:32:13PM +, Phil Edworthy wrote: > > > > o

RE: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread Phil Edworthy
Hi Arnd, On 12 November 2015 09:49, Arnd Bergmann wrote: > On Thursday 12 November 2015 09:26:33 Phil Edworthy wrote: > > On 11 November 2015 18:25, LIviu wrote: > > > On Mon, Nov 09, 2015 at 12:32:13PM +, Phil Edworthy wrote: > > > > I think you're mixing things a bit or not explaining them

Re: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread liviu.du...@arm.com
On Thu, Nov 12, 2015 at 09:26:33AM +, Phil Edworthy wrote: > Hi Liviu, Arnd, > > On 11 November 2015 18:25, LIviu wrote: > > On Mon, Nov 09, 2015 at 12:32:13PM +, Phil Edworthy wrote: > > > Hi Liviu, Will, > > > > > > On 04 November 2015 15:19, Phil wrote: > > > > On 04 November 2015 15:02

Re: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread Arnd Bergmann
On Thursday 12 November 2015 09:26:33 Phil Edworthy wrote: > On 11 November 2015 18:25, LIviu wrote: > > On Mon, Nov 09, 2015 at 12:32:13PM +, Phil Edworthy wrote: > > I think you're mixing things a bit or not explaining them very well. Having > > the > > PCIe controller limited to 32-bit AXI

RE: PCIe host controller behind IOMMU on ARM

2015-11-12 Thread Phil Edworthy
Hi Liviu, Arnd, On 11 November 2015 18:25, LIviu wrote: > On Mon, Nov 09, 2015 at 12:32:13PM +, Phil Edworthy wrote: > > Hi Liviu, Will, > > > > On 04 November 2015 15:19, Phil wrote: > > > On 04 November 2015 15:02, Liviu wrote: > > > > On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy

Re: PCIe host controller behind IOMMU on ARM

2015-11-11 Thread Arnd Bergmann
On Wednesday 11 November 2015 18:24:56 liviu.du...@arm.com wrote: > > > Somewhat related to this, since our PCIe controller HW is limited to > > 32-bit AXI address range, before trying to hook up the IOMMU I have > > tried to limit the dma_mask for PCI cards to DMA_BIT_MASK(32). The > > reason bei

Re: PCIe host controller behind IOMMU on ARM

2015-11-11 Thread liviu.du...@arm.com
On Mon, Nov 09, 2015 at 12:32:13PM +, Phil Edworthy wrote: > Hi Liviu, Will, > > On 04 November 2015 15:19, Phil wrote: > > On 04 November 2015 15:02, Liviu wrote: > > > On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy wrote: > > > > Hi Liviu, > > > > > > > > On 04 November 2015 14:24,

RE: PCIe host controller behind IOMMU on ARM

2015-11-09 Thread Phil Edworthy
Hi Liviu, Will, On 04 November 2015 15:19, Phil wrote: > On 04 November 2015 15:02, Liviu wrote: > > On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy wrote: > > > Hi Liviu, > > > > > > On 04 November 2015 14:24, Liviu wrote: > > > > On Wed, Nov 04, 2015 at 01:57:48PM +, Phil Edworthy wr

RE: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi Will, On 04 November 2015 15:30, Will wrote: > On Wed, Nov 04, 2015 at 03:19:13PM +, Phil Edworthy wrote: > > On 04 November 2015 15:02, Liviu wrote: > > > On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy wrote: > > > > Sure, though since this is bog standard Intel PCIe ethernet card

Re: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Will Deacon
On Wed, Nov 04, 2015 at 03:19:13PM +, Phil Edworthy wrote: > On 04 November 2015 15:02, Liviu wrote: > > On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy wrote: > > > Sure, though since this is bog standard Intel PCIe ethernet card which > > > works > > > fine when the IOMMU is effectiv

RE: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi Liviu, On 04 November 2015 15:02, Liviu wrote: > On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy wrote: > > Hi Liviu, > > > > On 04 November 2015 14:24, Liviu wrote: > > > On Wed, Nov 04, 2015 at 01:57:48PM +, Phil Edworthy wrote: > > > > Hi, > > > > > > > > I am trying to hook up a

Re: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread liviu.du...@arm.com
On Wed, Nov 04, 2015 at 02:48:38PM +, Phil Edworthy wrote: > Hi Liviu, > > On 04 November 2015 14:24, Liviu wrote: > > On Wed, Nov 04, 2015 at 01:57:48PM +, Phil Edworthy wrote: > > > Hi, > > > > > > I am trying to hook up a PCIe host controller that sits behind an IOMMU, > > > but having

RE: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi Liviu, On 04 November 2015 14:24, Liviu wrote: > On Wed, Nov 04, 2015 at 01:57:48PM +, Phil Edworthy wrote: > > Hi, > > > > I am trying to hook up a PCIe host controller that sits behind an IOMMU, > > but having some problems. > > > > I'm using the pcie-rcar PCIe host controller and it work

Re: PCIe host controller behind IOMMU on ARM

2015-11-04 Thread liviu.du...@arm.com
On Wed, Nov 04, 2015 at 01:57:48PM +, Phil Edworthy wrote: > Hi, > > I am trying to hook up a PCIe host controller that sits behind an IOMMU, > but having some problems. > > I'm using the pcie-rcar PCIe host controller and it works fine without > the IOMMU, and I can attach the IOMMU to the c

PCIe host controller behind IOMMU on ARM

2015-11-04 Thread Phil Edworthy
Hi, I am trying to hook up a PCIe host controller that sits behind an IOMMU, but having some problems. I'm using the pcie-rcar PCIe host controller and it works fine without the IOMMU, and I can attach the IOMMU to the controller such that any calls to dma_alloc_coherent made by the controller dr