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

Will Deacon will.deacon at arm.com
Mon Jun 16 08:27:39 PDT 2014


Hi Varun,

On Thu, Jun 05, 2014 at 08:10:19PM +0100, Varun Sethi wrote:
> > The set of StreamIDs that can be generated by a master is fixed in the
> > hardware. The SMMU can then be programmed to map these incoming IDs onto
> > a context ID (or a set of context IDs), which are the IDs used internally
> > by the SMMU to find the page tables etc.
> > 
> > The StreamID -> ContextID mapping is dynamic and controlled by software.
> > The Master -> StreamIDs mapping is fixed in the hardware.
> The Master -> StreamIDs mapping may not always be fixed in the hardware.
> At, least in our case we plan to program these via software. PCI devices
> is one place where this mapping would have to be dynamic (based on the
> topology i.e. if the devices are connected to a bridge etc). Also, we have
> a hot plug device architecture where the stream ID is software
> programmable.
> 
> Other than that, based on the isolation requirements (iommu domain)
> software programmability offers greater flexibility.

For the sake of consistency, I'd really like to treat the master ->
streamIDs mapping as fixed. If that means setting it once during boot in
your case, then so be it (ideally in the firmware). That way, we just
describe the fixed mapping to the kernel and the driver doesn't have to
worry about changing the mapping, especially given that that's likely to be
highly error-prone once the SMMU is in us.

Do you have use-cases where you really need to change these mappings
dynamically?

Will



More information about the linux-arm-kernel mailing list