[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130117163941.GL3699@mudshark.cambridge.arm.com>
Date: Thu, 17 Jan 2013 16:39:41 +0000
From: Will Deacon <will.deacon@....com>
To: Hiroshi Doyu <hdoyu@...dia.com>
Cc: "pullip.cho@...sung.com" <pullip.cho@...sung.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-samsung-soc@...r.kernel.org"
<linux-samsung-soc@...r.kernel.org>,
"kgene.kim@...sung.com" <kgene.kim@...sung.com>,
"prathyush.k@...sung.com" <prathyush.k@...sung.com>,
"joro@...tes.org" <joro@...tes.org>,
"sw0312.kim@...sung.com" <sw0312.kim@...sung.com>,
"inki.dae@...sung.com" <inki.dae@...sung.com>,
"subash.ramaswamy@...aro.org" <subash.ramaswamy@...aro.org>,
"sanghyun75.lee@...sung.com" <sanghyun75.lee@...sung.com>,
"rahul.sharma@...sung.com" <rahul.sharma@...sung.com>,
"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
Mark Rutland <Mark.Rutland@....com>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v5 06/14] ARM: EXYNOS: add System MMU definition to DT
Hi Hiroshi,
On Wed, Jan 16, 2013 at 04:43:21PM +0000, Hiroshi Doyu wrote:
> Will Deacon <will.deacon@....com> wrote @ Wed, 16 Jan 2013 12:51:14 +0100:
> > Given that this information is not discoverable, it needs to be encoded
> > in the device tree, but where? I can see two approaches:
> >
> > 1. For each IOMMU node, list phandles to the devices connected to it
> > and have a corresponding list of StreamIDs.
> >
> > or
> >
> > 2. For each device wishing to use an IOMMU, have a phandle to the
> > IOMMU node and a separate StreamID property. The IOMMU would then
> > parse this information when the device is added to the bus.
> >
> > Although I prefer the second approach, it has the downside of affecting
> > all device bindings that wish to use an IOMMU, so I'm open to any other
> > ideas.
>
> Actually the above summarize tegra SMMU situation well too. For
> example, each IOMMU'able device has IOVA constraint that some of the
> address area isn't available because of its MMIO. This info needs to
> be described in DT. If <IOMMU phandle> + some parametes are embedded
> in a device node, that info could be dealt at a bus notifier(*1).
>
> *1: http://lists.linuxfoundation.org/pipermail/iommu/2012-November/004934.html
I've been thinking about this a bit more and, unfortunately, my conclusion
is that method (2) above is problematic, so we do need something similar to
(1).
The reason for this comes about when dealing with chained IOMMUs. In this
case, each IOMMU in the chain needs to know about all of the masters hanging
beneath it (potentially behind other IOMMUs) but may also need to supplement
each device with additional data relevant to that point in the IOMMU chain.
In the case of the ARM System MMU, this could be StreamID information (as
the StreamID for a device can change as the transaction stream passes
through an SMMU) and for your case it could be that the DMA window is
widened along the chain.
So, extending the mmu-master property described in this thread to be
"mmu-masters : a list of phandles to device nodes representing bus masters
for which the IOMMU can provide a translation" is probably a good start.
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists