Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-10-06 Thread Thierry Reding
On Mon, Oct 06, 2014 at 01:50:40PM +0300, Laurent Pinchart wrote: > Hi Thierry and Will, > > On Monday 06 October 2014 11:52:50 Thierry Reding wrote: > > On Fri, Oct 03, 2014 at 04:08:50PM +0100, Will Deacon wrote: > > > On Wed, Oct 01, 2014 at 09:46:10AM +0100, Thierry Reding wrote: > > >> On Tue

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-10-06 Thread Laurent Pinchart
Hi Thierry and Will, On Monday 06 October 2014 11:52:50 Thierry Reding wrote: > On Fri, Oct 03, 2014 at 04:08:50PM +0100, Will Deacon wrote: > > On Wed, Oct 01, 2014 at 09:46:10AM +0100, Thierry Reding wrote: > >> On Tue, Sep 30, 2014 at 05:00:35PM +0100, Will Deacon wrote: > >>> On Thu, Sep 25, 2

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-10-06 Thread Thierry Reding
On Fri, Oct 03, 2014 at 04:08:50PM +0100, Will Deacon wrote: > Hi Thierry, > > On Wed, Oct 01, 2014 at 09:46:10AM +0100, Thierry Reding wrote: > > On Tue, Sep 30, 2014 at 05:00:35PM +0100, Will Deacon wrote: > > > On Thu, Sep 25, 2014 at 07:40:23AM +0100, Thierry Reding wrote: > > [...] > > > > So

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-10-03 Thread Will Deacon
Hi Thierry, On Wed, Oct 01, 2014 at 09:46:10AM +0100, Thierry Reding wrote: > On Tue, Sep 30, 2014 at 05:00:35PM +0100, Will Deacon wrote: > > On Thu, Sep 25, 2014 at 07:40:23AM +0100, Thierry Reding wrote: > [...] > > > So I think what we're going to need is a way to prevent the default > > > att

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-10-01 Thread Thierry Reding
On Tue, Sep 30, 2014 at 05:00:35PM +0100, Will Deacon wrote: > On Thu, Sep 25, 2014 at 07:40:23AM +0100, Thierry Reding wrote: [...] > > So I think what we're going to need is a way to prevent the default > > attachment to DMA/IOMMU. Or alternatively not associate devices with > > IOMMU domains by

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-30 Thread Will Deacon
Hi Thierry, On Thu, Sep 25, 2014 at 07:40:23AM +0100, Thierry Reding wrote: > On Wed, Sep 24, 2014 at 05:33:38PM +0100, Will Deacon wrote: > > On Tue, Sep 23, 2014 at 08:14:01AM +0100, Thierry Reding wrote: > > > On Mon, Sep 22, 2014 at 06:43:37PM +0100, Will Deacon wrote: > > > > Yup. In this cas

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-24 Thread Thierry Reding
On Wed, Sep 24, 2014 at 05:33:38PM +0100, Will Deacon wrote: > On Tue, Sep 23, 2014 at 08:14:01AM +0100, Thierry Reding wrote: > > On Mon, Sep 22, 2014 at 06:43:37PM +0100, Will Deacon wrote: > > > Yup. In this case, the iommu_dma_mapping passed to arch_setup_dma_ops > > > contains a domain and an

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-24 Thread Will Deacon
On Tue, Sep 23, 2014 at 08:14:01AM +0100, Thierry Reding wrote: > On Mon, Sep 22, 2014 at 06:43:37PM +0100, Will Deacon wrote: > > Yup. In this case, the iommu_dma_mapping passed to arch_setup_dma_ops > > contains a domain and an allocator for each IOMMU instance in the system. > > It would then be

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-23 Thread Thierry Reding
On Mon, Sep 22, 2014 at 06:43:37PM +0100, Will Deacon wrote: > Hi Thierry, > > On Mon, Sep 22, 2014 at 10:19:35AM +0100, Thierry Reding wrote: > > On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: > > [...] > > > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, >

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-22 Thread Will Deacon
Hi Thierry, On Mon, Sep 22, 2014 at 10:19:35AM +0100, Thierry Reding wrote: > On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: > [...] > > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 > > size) > > +{ > > + struct dma_iommu_mapping *mapping; > > + > > +

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-22 Thread Laurent Pinchart
On Monday 22 September 2014 11:19:35 Thierry Reding wrote: > On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: > [...] > > > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 > > size) +{ > > + struct dma_iommu_mapping *mapping; > > + > > + mapping = arm_iom

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-22 Thread Thierry Reding
On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: [...] > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 > size) > +{ > + struct dma_iommu_mapping *mapping; > + > + mapping = arm_iommu_create_mapping(dev->bus, dma_base, size); If I understand correct