From: Magnus Damm <magnus.damm@gmail.com>
To: iommu@lists.linux-foundation.org
Cc: laurent.pinchart+renesas@ideasonboard.com,
geert+renesas@glider.be, joro@8bytes.org,
linux-renesas-soc@vger.kernel.org, horms+renesas@verge.net.au,
Magnus Damm <magnus.damm@gmail.com>,
robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH/RFC v2 1/4] iommu/of: Skip IOMMU devices disabled in DT
Date: Fri, 27 Jan 2017 15:14:16 +0900 [thread overview]
Message-ID: <148549765644.22203.4025544332917256731.sendpatchset@little-apple> (raw)
In-Reply-To: <148549764733.22203.16459470412085471955.sendpatchset@little-apple>
From: Magnus Damm <damm+renesas@opensource.se>
Extend the shared IOMMU code to skip over ->xlate() in case the
IOMMU device pointed to by a slave device has been disabled in DT.
Difficult to trigger in case a single IOMMU device is used, however
when multiple IOMMUs are used and some of them are disabled in DT
then this patch makes sure that ->xlate() only gets invoked for the
enabled ones.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
I used to keep this as a local check in the xlate() callback
for the not-yet-merged-upstream R-Car Gen3 IPMMU driver stack.
Since honoring DT disabled devices probably makes sense for most users
it seems like a good plan to try to push it into the common subsystem level.
Thanks to Geert for suggesting this ages ago.
Developed on top of renesas-drivers-2017-01-24-v4.10-rc5 which
includes a recent version of iommu/next.
drivers/iommu/of_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/drivers/iommu/of_iommu.c
+++ work/drivers/iommu/of_iommu.c 2017-01-27 13:19:22.540607110 +0900
@@ -159,7 +159,7 @@ const struct iommu_ops *of_iommu_configu
np = iommu_spec.np;
ops = of_iommu_get_ops(np);
- if (!ops || !ops->of_xlate ||
+ if (!ops || !ops->of_xlate || !of_device_is_available(np) ||
iommu_fwspec_init(dev, &np->fwnode, ops) ||
ops->of_xlate(dev, &iommu_spec))
goto err_put_node;
WARNING: multiple messages have this Message-ID (diff)
From: Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org,
geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org,
Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH/RFC v2 1/4] iommu/of: Skip IOMMU devices disabled in DT
Date: Fri, 27 Jan 2017 15:14:16 +0900 [thread overview]
Message-ID: <148549765644.22203.4025544332917256731.sendpatchset@little-apple> (raw)
In-Reply-To: <148549764733.22203.16459470412085471955.sendpatchset@little-apple>
From: Magnus Damm <damm+renesas-yzvPICuk2ACczHhG9Qg4qA@public.gmane.org>
Extend the shared IOMMU code to skip over ->xlate() in case the
IOMMU device pointed to by a slave device has been disabled in DT.
Difficult to trigger in case a single IOMMU device is used, however
when multiple IOMMUs are used and some of them are disabled in DT
then this patch makes sure that ->xlate() only gets invoked for the
enabled ones.
Signed-off-by: Magnus Damm <damm+renesas-yzvPICuk2ACczHhG9Qg4qA@public.gmane.org>
---
I used to keep this as a local check in the xlate() callback
for the not-yet-merged-upstream R-Car Gen3 IPMMU driver stack.
Since honoring DT disabled devices probably makes sense for most users
it seems like a good plan to try to push it into the common subsystem level.
Thanks to Geert for suggesting this ages ago.
Developed on top of renesas-drivers-2017-01-24-v4.10-rc5 which
includes a recent version of iommu/next.
drivers/iommu/of_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/drivers/iommu/of_iommu.c
+++ work/drivers/iommu/of_iommu.c 2017-01-27 13:19:22.540607110 +0900
@@ -159,7 +159,7 @@ const struct iommu_ops *of_iommu_configu
np = iommu_spec.np;
ops = of_iommu_get_ops(np);
- if (!ops || !ops->of_xlate ||
+ if (!ops || !ops->of_xlate || !of_device_is_available(np) ||
iommu_fwspec_init(dev, &np->fwnode, ops) ||
ops->of_xlate(dev, &iommu_spec))
goto err_put_node;
WARNING: multiple messages have this Message-ID (diff)
From: magnus.damm@gmail.com (Magnus Damm)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH/RFC v2 1/4] iommu/of: Skip IOMMU devices disabled in DT
Date: Fri, 27 Jan 2017 15:14:16 +0900 [thread overview]
Message-ID: <148549765644.22203.4025544332917256731.sendpatchset@little-apple> (raw)
In-Reply-To: <148549764733.22203.16459470412085471955.sendpatchset@little-apple>
From: Magnus Damm <damm+renesas@opensource.se>
Extend the shared IOMMU code to skip over ->xlate() in case the
IOMMU device pointed to by a slave device has been disabled in DT.
Difficult to trigger in case a single IOMMU device is used, however
when multiple IOMMUs are used and some of them are disabled in DT
then this patch makes sure that ->xlate() only gets invoked for the
enabled ones.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
I used to keep this as a local check in the xlate() callback
for the not-yet-merged-upstream R-Car Gen3 IPMMU driver stack.
Since honoring DT disabled devices probably makes sense for most users
it seems like a good plan to try to push it into the common subsystem level.
Thanks to Geert for suggesting this ages ago.
Developed on top of renesas-drivers-2017-01-24-v4.10-rc5 which
includes a recent version of iommu/next.
drivers/iommu/of_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/drivers/iommu/of_iommu.c
+++ work/drivers/iommu/of_iommu.c 2017-01-27 13:19:22.540607110 +0900
@@ -159,7 +159,7 @@ const struct iommu_ops *of_iommu_configu
np = iommu_spec.np;
ops = of_iommu_get_ops(np);
- if (!ops || !ops->of_xlate ||
+ if (!ops || !ops->of_xlate || !of_device_is_available(np) ||
iommu_fwspec_init(dev, &np->fwnode, ops) ||
ops->of_xlate(dev, &iommu_spec))
goto err_put_node;
next prev parent reply other threads:[~2017-01-27 6:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 6:14 [PATCH/RFC v2 0/4] iommu/ipmmu-vmsa: IPMMU slave device whitelist V2 Magnus Damm
2017-01-27 6:14 ` Magnus Damm
2017-01-27 6:14 ` Magnus Damm
2017-01-27 6:14 ` Magnus Damm [this message]
2017-01-27 6:14 ` [PATCH/RFC v2 1/4] iommu/of: Skip IOMMU devices disabled in DT Magnus Damm
2017-01-27 6:14 ` Magnus Damm
2017-01-27 6:14 ` [PATCH/RFC v2 2/4] iommu/ipmmu-vmsa: Get rid of disabled device check Magnus Damm
2017-01-27 6:14 ` Magnus Damm
2017-01-27 6:14 ` [PATCH/RFC v2 3/4] iommu/ipmmu-vmsa: Check devices in xlate() Magnus Damm
2017-01-27 6:14 ` Magnus Damm
2017-01-27 6:14 ` [PATCH/RFC v2 3/4] iommu/ipmmu-vmsa: Opt-in slave devices based on ES version Magnus Damm
2017-01-27 6:14 ` Magnus Damm
2017-03-06 9:00 ` [PATCH/RFC v2 0/4] iommu/ipmmu-vmsa: IPMMU slave device whitelist V2 Magnus Damm
2017-03-06 9:00 ` Magnus Damm
2017-03-06 9:00 ` Magnus Damm
2017-03-22 14:25 ` Joerg Roedel
2017-03-22 14:25 ` Joerg Roedel
2017-03-22 14:25 ` Joerg Roedel
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=148549765644.22203.4025544332917256731.sendpatchset@little-apple \
--to=magnus.damm@gmail.com \
--cc=geert+renesas@glider.be \
--cc=horms+renesas@verge.net.au \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=robin.murphy@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.