public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: hdoyu@nvidia•com (Hiroshi Doyu)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v5] devicetree: Add generic IOMMU device tree bindings
Date: Tue, 19 Aug 2014 14:03:00 +0300	[thread overview]
Message-ID: <87wqa4hhcr.fsf@nvidia.com> (raw)
In-Reply-To: <a0244b6befa9407fb6c2c35cc29f92f7@BL2PR03MB468.namprd03.prod.outlook.com>


Varun Sethi <Varun.Sethi@freescale•com> writes:

>> >> > Also, for dynamic stream ID allocation we would need to represent
>> >> > the specific master register (to store the stream ID) in the device tree.
>> >>
>> >> I assmue that the above means that iMX has such configuration
>> >> register to map steramID and a device dynamically.
>> >
>> > We have per master registers for setting the stream ID on the
>> > Layerscape platforms. My point was that we would need the iommu master
>> > node to include a reference to the master id register.
>> >
>> > master at 1 {
>> >                /* device has master ID 42 in the IOMMU */
>> >              iommus = <&{/iommu} 42>;
>> >              master-id-reg = <phandle offset> };
>> 
>> In the above, for "iommus=" bindings, you wouldn't need to break
>> ARM,SMMU compatibility at all if you set "streamID" exactly as below.
>> 
>>   master at 1 {
>>                  /* device has master ID 42 in the IOMMU */
>>                iommus = <&{/iommu} 'any given streamID'>;
>>                master-id-reg = <phandle offset>
>>   };
>> 
>> And your SoC needs to register bus_notifier and ADD_DEVICE should configure
>> to map 'any given streamID' to a device via the above register. This wouldn't
>> need any modification from ARM,SMMU driver and keep the iommus bindings
>> as it is.
>> 
>> IOW, SoC only needs to register ADD_DEVICE in bus_notifier to map StreamID
>> to a device. This needs to be executed earlier than IOMMU bus's ADD_DEVICE,
>> though.
>> 
>> Is my understanding right?
>
> I don't think that SOC specific code needs a bus notifier for setting
> the stream ID. It can be done as a part of SOC specific
> initialization. The device tree can be updated to reflect the correct
> stream ID (SMMU driver can get the updated stream ID from device
> tree). 

That's possible.

> I was thinking more on the lines of updating the device stream id
> while attaching a device to the domain.

I thought the same but this would break the ARM,SMMU /compatibility/
since the 1st param of "iommus=" is always expected as "streamID".

If streamID can be assigned dynamically like PCIe, not like streamID
statically set in DT, how should we describe this dynmaic steramID
shifting/assignment in DT?

  reply	other threads:[~2014-08-19 11:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 10:43 [PATCH v5] devicetree: Add generic IOMMU device tree bindings Thierry Reding
2014-07-31 10:54 ` Mark Rutland
2014-07-31 12:04 ` Joerg Roedel
2014-07-31 15:38   ` Olof Johansson
2014-07-31 16:36     ` Joerg Roedel
2014-07-31 17:14       ` Olof Johansson
2014-07-31 17:23         ` Joerg Roedel
2014-07-31 18:09 ` Laurent Pinchart
2014-08-14  6:47 ` Hiroshi Doyu
2014-08-14 14:45   ` Varun Sethi
2014-08-14 16:04     ` Hiroshi Doyu
2014-08-19  9:52       ` Varun Sethi
2014-08-19 10:03         ` Hiroshi Doyu
2014-08-19 10:47           ` Varun Sethi
2014-08-19 11:03             ` Hiroshi Doyu [this message]
2014-08-19 12:01               ` Varun Sethi
2014-08-15 11:51   ` Will Deacon
2014-08-15 12:29     ` Hiroshi Doyu
2014-08-15 13:14       ` Will Deacon
2014-08-19 12:11     ` Varun Sethi
2014-08-22 15:33       ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqa4hhcr.fsf@nvidia.com \
    --to=hdoyu@nvidia$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox