From: Varun.Sethi@freescale.com (Varun Sethi)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH] devicetree: Add master-id-bits property to the iommu device
Date: Sun, 14 Sep 2014 23:47:26 +0530 [thread overview]
Message-ID: <1410718646-9710-1-git-send-email-Varun.Sethi@freescale.com> (raw)
"master-id-bits" property added to the IOMMU device node. This property can
be used by the IOMMU driver to match relevan bits in the master id expressed
by a DMA master.
This can be used to mask out certain bits that get added to the device master id
due to IOMMU topology. For example, in case of MMU-500 the TBUID gets appended to
the master id. This prevents sharing of a stream ID, amongst devices which are
connected to different TBUs.
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
---
Documentation/devicetree/bindings/iommu/iommu.txt | 29 +++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/Documentation/devicetree/bindings/iommu/iommu.txt b/Documentation/devicetree/bindings/iommu/iommu.txt
index 5a8b462..f7c8623 100644
--- a/Documentation/devicetree/bindings/iommu/iommu.txt
+++ b/Documentation/devicetree/bindings/iommu/iommu.txt
@@ -63,6 +63,23 @@ Note that these are merely examples and real-world use-cases may use different
definitions to represent their individual needs. Always refer to the specific
IOMMU binding for the exact meaning of the cells that make up the specifier.
+Optional properties:
+--------------------
+- master-id-bits: This specifies number of master id bits used by the iommu, to
+ match master id expressed by the DMA master device. This would be typically used
+ in cases where we need DMA memory isolation between multiple masters. Each master
+ would specify a master id associated with a DMA trasaction.
+
+ The IOMMU driver can use this property to generate a mask to match only relevant
+ bits in the master id. This can be used for masking out certain bits that get
+ added to the master id as a part of the IOMMU topology.
+
+ For example, in case of MMU-500 the TBU identifier is also appended to the master id.
+ This posese issues for software implementations requiring dynamic master id allocation
+ for supporting hot pluggable devices. It's possible to have a device group, with
+ devices connected to different TBUs. Without masking the additional TBU ID bits, we
+ can't share the master id across all devices in the device group.
+
IOMMU master node:
==================
@@ -147,6 +164,12 @@ Multiple-master IOMMU:
iommu {
/* the specifier represents the ID of the master */
#iommu-cells = <1>;
+
+ /*
+ * This specifies number of master id bits used by
+ * the iommu for matching the master id.
+ */
+ master-id-bits = <7>
};
master at 1 {
@@ -173,6 +196,12 @@ Multiple-master IOMMU with configurable DMA window:
* master (i.e. the I/O virtual address space).
*/
#iommu-cells = <4>;
+
+ /*
+ * This specifies number of master id bits used by
+ * the iommu for matching the master id.
+ */
+ master-id-bits = <7>
};
master {
--
1.7.9.5
next reply other threads:[~2014-09-14 18:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 18:17 Varun Sethi [this message]
2014-09-15 2:38 ` [RFC][PATCH] devicetree: Add master-id-bits property to the iommu device Arnd Bergmann
2014-09-15 10:37 ` Varun Sethi
2014-09-15 16:57 ` Arnd Bergmann
2014-09-16 18:04 ` Varun Sethi
2014-09-22 9:23 ` Thierry Reding
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=1410718646-9710-1-git-send-email-Varun.Sethi@freescale.com \
--to=varun.sethi@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).