Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Laurent Pinchart
Hi Arnd, On Monday 19 January 2015 17:13:14 Arnd Bergmann wrote: > On Sunday 18 January 2015 13:18:51 Laurent Pinchart wrote: > > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > >> On 01/16/2015 08:18 AM, Laurent Pinchart wrote: > >>> On Thursday 15 January 2015 11:12:17 Will Deacon

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Laurent Pinchart
Hi Will, On Tuesday 20 January 2015 15:19:11 Will Deacon wrote: > On Tue, Jan 20, 2015 at 03:14:01PM +, Laurent Pinchart wrote: > > On Monday 19 January 2015 13:31:00 Thierry Reding wrote: > >> On Mon, Jan 19, 2015 at 01:34:24PM +0200, Laurent Pinchart wrote: > >>> On Monday 19 January 2015 11

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Laurent Pinchart
Hi Thierry and Will, On Monday 19 January 2015 13:31:00 Thierry Reding wrote: > On Mon, Jan 19, 2015 at 01:34:24PM +0200, Laurent Pinchart wrote: > > On Monday 19 January 2015 11:12:02 Will Deacon wrote: > >> On Sun, Jan 18, 2015 at 11:18:51AM +, Laurent Pinchart wrote: > >>> On Sunday 18 Janu

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Will Deacon
On Tue, Jan 20, 2015 at 03:19:10PM +, Will Deacon wrote: > We could restore the set_dma_ops call in arm_iommu_attach_device as a > temporary hack (along with a big fat comment), since arch_setup_dma_ops > actually sets the ops correct *after* the call to > arm_get_iommu_dma_map_ops... s/arm_ge

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Will Deacon
On Tue, Jan 20, 2015 at 03:14:01PM +, Laurent Pinchart wrote: > On Monday 19 January 2015 13:31:00 Thierry Reding wrote: > > On Mon, Jan 19, 2015 at 01:34:24PM +0200, Laurent Pinchart wrote: > > > On Monday 19 January 2015 11:12:02 Will Deacon wrote: > > >> On Sun, Jan 18, 2015 at 11:18:51AM +0

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Laurent Pinchart
Hi Thierry, On Monday 19 January 2015 13:49:36 Thierry Reding wrote: > On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: > [...] > > > The second way is to implement a mechanism to let drivers signal that they > > want to handle DMA mappings themselves. As the mappings need in the

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Laurent Pinchart
Hi Thierry, On Monday 19 January 2015 14:36:38 Thierry Reding wrote: > On Mon, Jan 19, 2015 at 12:50:52PM +, Will Deacon wrote: > > On Mon, Jan 19, 2015 at 12:43:06PM +, Thierry Reding wrote: > >> On Sun, Jan 18, 2015 at 01:18:51PM +0200, Laurent Pinchart wrote: > >> > On Sunday 18 January

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-20 Thread Laurent Pinchart
Hi Thierry, On Monday 19 January 2015 17:21:14 Thierry Reding wrote: > On Mon, Jan 19, 2015 at 04:52:41PM +0100, Arnd Bergmann wrote: > > On Monday 19 January 2015 13:36:24 Thierry Reding wrote: > >> On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: > >>> On Thursday 15 January 201

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Arnd Bergmann
On Monday 19 January 2015 17:21:14 Thierry Reding wrote: > On Mon, Jan 19, 2015 at 04:52:41PM +0100, Arnd Bergmann wrote: > > On Monday 19 January 2015 13:36:24 Thierry Reding wrote: > > > On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: > > > > On Thursday 15 January 2015 11:12:17

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Thierry Reding
On Mon, Jan 19, 2015 at 04:52:41PM +0100, Arnd Bergmann wrote: > On Monday 19 January 2015 13:36:24 Thierry Reding wrote: > > On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: > > > On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > > > > On Thu, Jan 15, 2015 at 08:28:44AM +0

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Arnd Bergmann
On Sunday 18 January 2015 13:18:51 Laurent Pinchart wrote: > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > > On 01/16/2015 08:18 AM, Laurent Pinchart wrote: > > > On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > > >> On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Arnd Bergmann
On Monday 19 January 2015 13:36:24 Thierry Reding wrote: > On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: > > On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > > > On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding wrote: > > > > On Wed, Jan 14, 2015 at 10:46:10AM +

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Thierry Reding
On Mon, Jan 19, 2015 at 12:50:52PM +, Will Deacon wrote: > On Mon, Jan 19, 2015 at 12:43:06PM +, Thierry Reding wrote: > > On Sun, Jan 18, 2015 at 01:18:51PM +0200, Laurent Pinchart wrote: > > > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > > > > On 01/16/2015 08:18 AM, Laur

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Will Deacon
On Mon, Jan 19, 2015 at 12:43:06PM +, Thierry Reding wrote: > On Sun, Jan 18, 2015 at 01:18:51PM +0200, Laurent Pinchart wrote: > > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > > > On 01/16/2015 08:18 AM, Laurent Pinchart wrote: > [...] > > > > The second way is to implement a

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Thierry Reding
On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: [...] > The second way is to implement a mechanism to let drivers signal that they > want to handle DMA mappings themselves. As the mappings need in the general > case to be created before the probe function is called we can't sign

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Thierry Reding
On Sun, Jan 18, 2015 at 01:18:51PM +0200, Laurent Pinchart wrote: > Hi Alexandre, > > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > > On 01/16/2015 08:18 AM, Laurent Pinchart wrote: [...] > > > The second way is to implement a mechanism to let drivers signal that they > > > want to

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Thierry Reding
On Fri, Jan 16, 2015 at 01:18:21AM +0200, Laurent Pinchart wrote: > On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > > On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding wrote: > > > On Wed, Jan 14, 2015 at 10:46:10AM +, Will Deacon wrote: > > > > On Wed, Jan 14, 2015 at 09:00:24

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Thierry Reding
On Mon, Jan 19, 2015 at 01:34:24PM +0200, Laurent Pinchart wrote: > Hi Will, > > On Monday 19 January 2015 11:12:02 Will Deacon wrote: > > On Sun, Jan 18, 2015 at 11:18:51AM +, Laurent Pinchart wrote: > > > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > > >> On 01/16/2015 08:18

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Laurent Pinchart
Hi Will, On Monday 19 January 2015 11:12:02 Will Deacon wrote: > On Sun, Jan 18, 2015 at 11:18:51AM +, Laurent Pinchart wrote: > > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > >> On 01/16/2015 08:18 AM, Laurent Pinchart wrote: > >>> On Thursday 15 January 2015 11:12:17 Will De

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-19 Thread Will Deacon
On Sun, Jan 18, 2015 at 11:18:51AM +, Laurent Pinchart wrote: > On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > > On 01/16/2015 08:18 AM, Laurent Pinchart wrote: > > > On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > > >> On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-18 Thread Laurent Pinchart
Hi Alexandre, On Sunday 18 January 2015 15:54:34 Alexandre Courbot wrote: > On 01/16/2015 08:18 AM, Laurent Pinchart wrote: > > On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > >> On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding wrote: > >>> On Wed, Jan 14, 2015 at 10:46:10AM +000

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-17 Thread Alexandre Courbot
On 01/16/2015 08:18 AM, Laurent Pinchart wrote: On Thursday 15 January 2015 11:12:17 Will Deacon wrote: On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding wrote: On Wed, Jan 14, 2015 at 10:46:10AM +, Will Deacon wrote: On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-15 Thread Laurent Pinchart
On Thursday 15 January 2015 11:12:17 Will Deacon wrote: > On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding wrote: > > On Wed, Jan 14, 2015 at 10:46:10AM +, Will Deacon wrote: > > > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > > [...] > > > >>> 2) Say you want to

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-15 Thread Will Deacon
On Thu, Jan 15, 2015 at 08:30:06AM +, Thierry Reding wrote: > On Wed, Jan 14, 2015 at 07:17:50PM +, Will Deacon wrote: > > On Wed, Jan 14, 2015 at 01:51:36PM +, Heiko Stübner wrote: > > > As Alexandre suspected the new Rockchip drm code seems to be affected by > > > this. I hadn't playe

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-15 Thread Will Deacon
On Thu, Jan 15, 2015 at 08:28:44AM +, Thierry Reding wrote: > On Wed, Jan 14, 2015 at 10:46:10AM +, Will Deacon wrote: > > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > [...] > > > 2) Say you want to use the IOMMU API in your driver, and have an iommu > > > property

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-15 Thread Thierry Reding
On Wed, Jan 14, 2015 at 07:17:50PM +, Will Deacon wrote: > On Wed, Jan 14, 2015 at 01:51:36PM +, Heiko Stübner wrote: > > Am Mittwoch, 14. Januar 2015, 10:46:10 schrieb Will Deacon: > > > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > > > > On 12/02/2014 01:57 AM, Will

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-15 Thread Thierry Reding
On Wed, Jan 14, 2015 at 10:46:10AM +, Will Deacon wrote: > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: [...] > > 2) Say you want to use the IOMMU API in your driver, and have an iommu > > property in your device's DT node. If by chance your IOMMU is registered > > early

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-14 Thread Alexandre Courbot
On 01/14/2015 07:46 PM, Will Deacon wrote: Hi Alex, On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: On 12/02/2014 01:57 AM, Will Deacon wrote: This patch plumbs the existing ARM IOMMU DMA infrastructure (which isn't actually called outside of a few drivers) into arch_setup_d

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-14 Thread Will Deacon
On Wed, Jan 14, 2015 at 01:51:36PM +, Heiko Stübner wrote: > Am Mittwoch, 14. Januar 2015, 10:46:10 schrieb Will Deacon: > > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > > > On 12/02/2014 01:57 AM, Will Deacon wrote: > > > > This patch plumbs the existing ARM IOMMU DMA i

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-14 Thread Heiko Stübner
Hi Will, Alexandre, Daniel, Am Mittwoch, 14. Januar 2015, 10:46:10 schrieb Will Deacon: > Hi Alex, > > On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > > On 12/02/2014 01:57 AM, Will Deacon wrote: > > > This patch plumbs the existing ARM IOMMU DMA infrastructure (which isn't >

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-14 Thread Will Deacon
Hi Alex, On Wed, Jan 14, 2015 at 09:00:24AM +, Alexandre Courbot wrote: > On 12/02/2014 01:57 AM, Will Deacon wrote: > > This patch plumbs the existing ARM IOMMU DMA infrastructure (which isn't > > actually called outside of a few drivers) into arch_setup_dma_ops, so > > that we can use IOMMUs

Re: [PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2015-01-14 Thread Alexandre Courbot
On 12/02/2014 01:57 AM, Will Deacon wrote: This patch plumbs the existing ARM IOMMU DMA infrastructure (which isn't actually called outside of a few drivers) into arch_setup_dma_ops, so that we can use IOMMUs for DMA transfers in a more generic fashion. Since this significantly complicates the a

[PATCH v6 8/8] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-12-01 Thread Will Deacon
This patch plumbs the existing ARM IOMMU DMA infrastructure (which isn't actually called outside of a few drivers) into arch_setup_dma_ops, so that we can use IOMMUs for DMA transfers in a more generic fashion. Since this significantly complicates the arch_setup_dma_ops function, it is moved out o