Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 18:09:54 Dave Martin wrote: > On Wed, May 21, 2014 at 11:00:38AM +0200, Thierry Reding wrote: > > On Wed, May 21, 2014 at 10:50:38AM +0200, Arnd Bergmann wrote: > > > On Wednesday 21 May 2014 10:26:11 Thierry Reding wrote: > > > > > > > > Similarily, should the IOMMU not b

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Dave Martin
On Wed, May 21, 2014 at 11:00:38AM +0200, Thierry Reding wrote: > On Wed, May 21, 2014 at 10:50:38AM +0200, Arnd Bergmann wrote: > > On Wednesday 21 May 2014 10:26:11 Thierry Reding wrote: > > > On Tue, May 20, 2014 at 10:26:12PM +0200, Arnd Bergmann wrote: > > > > On Tuesday 20 May 2014 16:24:59 D

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 08:44:42 Grant Grundler wrote: > On Wed, May 21, 2014 at 2:32 AM, Arnd Bergmann wrote: > > On Wednesday 21 May 2014 11:02:45 Thierry Reding wrote: > >> On Wed, May 21, 2014 at 10:54:42AM +0200, Arnd Bergmann wrote: > >> > >> > Right. As long as we always unmap the buffers

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Grant Grundler
On Wed, May 21, 2014 at 2:32 AM, Arnd Bergmann wrote: > On Wednesday 21 May 2014 11:02:45 Thierry Reding wrote: >> On Wed, May 21, 2014 at 10:54:42AM +0200, Arnd Bergmann wrote: >> >> > Right. As long as we always unmap the buffers from the IOMMU after they >> > have stopped being in use, it's ver

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 12:50:38 Thierry Reding wrote: > On Wed, May 21, 2014 at 11:36:32AM +0200, Arnd Bergmann wrote: > > On Wednesday 21 May 2014 11:00:38 Thierry Reding wrote: > > > On Wed, May 21, 2014 at 10:50:38AM +0200, Arnd Bergmann wrote: > > > > On Wednesday 21 May 2014 10:26:11 Thierry

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Thierry Reding
On Wed, May 21, 2014 at 11:36:32AM +0200, Arnd Bergmann wrote: > On Wednesday 21 May 2014 11:00:38 Thierry Reding wrote: > > On Wed, May 21, 2014 at 10:50:38AM +0200, Arnd Bergmann wrote: > > > On Wednesday 21 May 2014 10:26:11 Thierry Reding wrote: > > > > > > > For determining dma masks, it is t

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 11:00:38 Thierry Reding wrote: > On Wed, May 21, 2014 at 10:50:38AM +0200, Arnd Bergmann wrote: > > On Wednesday 21 May 2014 10:26:11 Thierry Reding wrote: > > > > > For determining dma masks, it is the output address that it > > > > > important. Santosh's code can probab

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 11:02:45 Thierry Reding wrote: > On Wed, May 21, 2014 at 10:54:42AM +0200, Arnd Bergmann wrote: > > > Right. As long as we always unmap the buffers from the IOMMU after they > > have stopped being in use, it's very unlikely that even a broken device > > driver causes a DMA

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Thierry Reding
On Wed, May 21, 2014 at 10:54:42AM +0200, Arnd Bergmann wrote: > On Wednesday 21 May 2014 10:16:09 Thierry Reding wrote: > > On Tue, May 20, 2014 at 10:31:29PM +0200, Arnd Bergmann wrote: > > > On Tuesday 20 May 2014 16:00:02 Thierry Reding wrote: > > > > On Tue, May 20, 2014 at 03:34:46PM +0200, A

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Thierry Reding
On Wed, May 21, 2014 at 10:50:38AM +0200, Arnd Bergmann wrote: > On Wednesday 21 May 2014 10:26:11 Thierry Reding wrote: > > On Tue, May 20, 2014 at 10:26:12PM +0200, Arnd Bergmann wrote: > > > On Tuesday 20 May 2014 16:24:59 Dave Martin wrote: > > > > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 10:16:09 Thierry Reding wrote: > On Tue, May 20, 2014 at 10:31:29PM +0200, Arnd Bergmann wrote: > > On Tuesday 20 May 2014 16:00:02 Thierry Reding wrote: > > > On Tue, May 20, 2014 at 03:34:46PM +0200, Arnd Bergmann wrote: > > > > On Tuesday 20 May 2014 15:17:43 Thierry Red

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Arnd Bergmann
On Wednesday 21 May 2014 10:26:11 Thierry Reding wrote: > On Tue, May 20, 2014 at 10:26:12PM +0200, Arnd Bergmann wrote: > > On Tuesday 20 May 2014 16:24:59 Dave Martin wrote: > > > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > > > > On Tuesday 20 May 2014 14:02:43 Thierry Reding

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Thierry Reding
On Tue, May 20, 2014 at 10:26:12PM +0200, Arnd Bergmann wrote: > On Tuesday 20 May 2014 16:24:59 Dave Martin wrote: > > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > > > On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: [...] > > > > Multiple-master IOMMU: > > > > ---

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-21 Thread Thierry Reding
On Tue, May 20, 2014 at 10:31:29PM +0200, Arnd Bergmann wrote: > On Tuesday 20 May 2014 16:00:02 Thierry Reding wrote: > > On Tue, May 20, 2014 at 03:34:46PM +0200, Arnd Bergmann wrote: > > > On Tuesday 20 May 2014 15:17:43 Thierry Reding wrote: > > > > On Tue, May 20, 2014 at 02:41:18PM +0200, Arn

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 17:39:12 Dave Martin wrote: > On Tue, May 20, 2014 at 04:26:59PM +0100, Will Deacon wrote: > > On Tue, May 20, 2014 at 02:23:47PM +0100, Arnd Bergmann wrote: > > > Bit# 3322 1100 > > > 10987654 32109876 54321098 76543210 > > > phys.hi ce

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 16:00:02 Thierry Reding wrote: > On Tue, May 20, 2014 at 03:34:46PM +0200, Arnd Bergmann wrote: > > On Tuesday 20 May 2014 15:17:43 Thierry Reding wrote: > > > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > > > > On Tuesday 20 May 2014 14:02:43 Thierry Redin

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 16:24:59 Dave Martin wrote: > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > > On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: > > > On Tue, May 20, 2014 at 01:15:48PM +0200, Arnd Bergmann wrote: > > > Typical values for the above include: > > > - #add

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Dave Martin
On Tue, May 20, 2014 at 04:26:59PM +0100, Will Deacon wrote: > On Tue, May 20, 2014 at 02:23:47PM +0100, Arnd Bergmann wrote: > > Bit# 3322 1100 > >10987654 32109876 54321098 76543210 > > phys.hi cell: npt000ss dfff > > phys.mid cel

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Will Deacon
On Tue, May 20, 2014 at 02:23:47PM +0100, Arnd Bergmann wrote: > Bit# 3322 1100 > 10987654 32109876 54321098 76543210 > phys.hi cell: npt000ss dfff > phys.mid cell: > phys.lo cell: ll

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Dave Martin
On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: > > On Tue, May 20, 2014 at 01:15:48PM +0200, Arnd Bergmann wrote: > > > On Tuesday 20 May 2014 13:05:37 Thierry Reding wrote: > > > > On Tue, May 20, 2014 at 12:04:54PM +0200, Arn

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Thierry Reding
On Tue, May 20, 2014 at 03:34:46PM +0200, Arnd Bergmann wrote: > On Tuesday 20 May 2014 15:17:43 Thierry Reding wrote: > > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > > > On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: > > [...] > > > > Couldn't a single-master IOMMU be w

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 15:17:43 Thierry Reding wrote: > On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > > On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: > [...] > > > Couldn't a single-master IOMMU be windowed? > > > > Ah, yes. That would actually be like an IBM pSeries, wh

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 14:07:09 Dave Martin wrote: > On Tue, May 20, 2014 at 12:08:44PM +0200, Arnd Bergmann wrote: > > On Monday 19 May 2014 22:32:33 Thierry Reding wrote: > > > On Mon, May 19, 2014 at 06:22:31PM +0100, Dave Martin wrote: > > > > On Mon, May 19, 2014 at 01:53:37PM +0100, Thierry R

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Thierry Reding
On Tue, May 20, 2014 at 02:41:18PM +0200, Arnd Bergmann wrote: > On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: [...] > > Couldn't a single-master IOMMU be windowed? > > Ah, yes. That would actually be like an IBM pSeries, which has a windowed > IOMMU but uses one window per virtual machine

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Dave Martin
On Tue, May 20, 2014 at 12:08:44PM +0200, Arnd Bergmann wrote: > On Monday 19 May 2014 22:32:33 Thierry Reding wrote: > > On Mon, May 19, 2014 at 06:22:31PM +0100, Dave Martin wrote: > > > On Mon, May 19, 2014 at 01:53:37PM +0100, Thierry Reding wrote: > > [...] > > > > My understanding here is mos

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 14:02:43 Thierry Reding wrote: > On Tue, May 20, 2014 at 01:15:48PM +0200, Arnd Bergmann wrote: > > On Tuesday 20 May 2014 13:05:37 Thierry Reding wrote: > > > On Tue, May 20, 2014 at 12:04:54PM +0200, Arnd Bergmann wrote: > > > > On Monday 19 May 2014 22:59:46 Thierry Reding

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Thierry Reding
On Tue, May 20, 2014 at 01:15:48PM +0200, Arnd Bergmann wrote: > On Tuesday 20 May 2014 13:05:37 Thierry Reding wrote: > > On Tue, May 20, 2014 at 12:04:54PM +0200, Arnd Bergmann wrote: > > > On Monday 19 May 2014 22:59:46 Thierry Reding wrote: > > > > On Mon, May 19, 2014 at 08:34:07PM +0200, Arnd

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Tuesday 20 May 2014 13:05:37 Thierry Reding wrote: > On Tue, May 20, 2014 at 12:04:54PM +0200, Arnd Bergmann wrote: > > On Monday 19 May 2014 22:59:46 Thierry Reding wrote: > > > On Mon, May 19, 2014 at 08:34:07PM +0200, Arnd Bergmann wrote: > > > > On Monday 19 May 2014 14:53:37 Thierry Reding

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Thierry Reding
On Tue, May 20, 2014 at 12:04:54PM +0200, Arnd Bergmann wrote: > On Monday 19 May 2014 22:59:46 Thierry Reding wrote: > > On Mon, May 19, 2014 at 08:34:07PM +0200, Arnd Bergmann wrote: > > > On Monday 19 May 2014 14:53:37 Thierry Reding wrote: > > > > On Mon, May 19, 2014 at 12:26:35PM +0200, Arnd

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Monday 19 May 2014 22:32:33 Thierry Reding wrote: > On Mon, May 19, 2014 at 06:22:31PM +0100, Dave Martin wrote: > > On Mon, May 19, 2014 at 01:53:37PM +0100, Thierry Reding wrote: > [...] > > > My understanding here is mostly based on the OpenFirmware working group > > > proposal for the dma-ra

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-20 Thread Arnd Bergmann
On Monday 19 May 2014 22:59:46 Thierry Reding wrote: > On Mon, May 19, 2014 at 08:34:07PM +0200, Arnd Bergmann wrote: > > On Monday 19 May 2014 14:53:37 Thierry Reding wrote: > > > On Mon, May 19, 2014 at 12:26:35PM +0200, Arnd Bergmann wrote: > > > > On Friday 16 May 2014 14:23:18 Thierry Reding w

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-19 Thread Thierry Reding
On Mon, May 19, 2014 at 08:34:07PM +0200, Arnd Bergmann wrote: > On Monday 19 May 2014 14:53:37 Thierry Reding wrote: > > On Mon, May 19, 2014 at 12:26:35PM +0200, Arnd Bergmann wrote: > > > On Friday 16 May 2014 14:23:18 Thierry Reding wrote: > > > > From: Thierry Reding > > > > > > > > This com

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-19 Thread Thierry Reding
On Mon, May 19, 2014 at 06:22:31PM +0100, Dave Martin wrote: > On Mon, May 19, 2014 at 01:53:37PM +0100, Thierry Reding wrote: [...] > > My understanding here is mostly based on the OpenFirmware working group > > proposal for the dma-ranges property[0]. I'll give another example to > > try and clar

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-19 Thread Arnd Bergmann
On Monday 19 May 2014 14:53:37 Thierry Reding wrote: > On Mon, May 19, 2014 at 12:26:35PM +0200, Arnd Bergmann wrote: > > On Friday 16 May 2014 14:23:18 Thierry Reding wrote: > > > From: Thierry Reding > > > > > > This commit introduces a generic device tree binding for IOMMU devices. > > > Only

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-19 Thread Dave Martin
On Mon, May 19, 2014 at 01:53:37PM +0100, Thierry Reding wrote: > On Mon, May 19, 2014 at 12:26:35PM +0200, Arnd Bergmann wrote: > > On Friday 16 May 2014 14:23:18 Thierry Reding wrote: > > > From: Thierry Reding > > > > > > This commit introduces a generic device tree binding for IOMMU devices.

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-19 Thread Thierry Reding
On Mon, May 19, 2014 at 12:26:35PM +0200, Arnd Bergmann wrote: > On Friday 16 May 2014 14:23:18 Thierry Reding wrote: > > From: Thierry Reding > > > > This commit introduces a generic device tree binding for IOMMU devices. > > Only a very minimal subset is described here, but it is enough to cove

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-19 Thread Arnd Bergmann
On Friday 16 May 2014 14:23:18 Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU and Tegra SMMU as > di

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-17 Thread Thierry Reding
On Sat, May 17, 2014 at 05:04:55PM +0900, Cho KyongHo wrote: > On Fri, 16 May 2014 14:23:18 +0200, Thierry Reding wrote: [...] > > +Examples: > > += > > + > > +Single-master IOMMU: > > + > > + > > + iommu { > > + #iommu-cells = <0>; > > + }; > > + > > + m

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-17 Thread Cho KyongHo
On Fri, 16 May 2014 14:23:18 +0200, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU and Tegra SMMU as

[PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-16 Thread Thierry Reding
From: Thierry Reding This commit introduces a generic device tree binding for IOMMU devices. Only a very minimal subset is described here, but it is enough to cover the requirements of both the Exynos System MMU and Tegra SMMU as discussed here: https://lkml.org/lkml/2014/4/27/346 More adva