From: Suman Anna <s-anna@ti.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: <iommu@lists.linux-foundation.org>,
Tony Lindgren <tony@atomide.com>, Tero Kristo <t-kristo@ti.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Suman Anna <s-anna@ti.com>
Subject: [PATCH v2 0/2] Dual MMU support for TI DRA7xx DSPs
Date: Tue, 5 Sep 2017 17:56:16 -0500 [thread overview]
Message-ID: <20170905225618.912-1-s-anna@ti.com> (raw)
Hi Joerg,
The following is v2 of the patch series that enhances the OMAP IOMMU driver
to support the mirror-programming of the two MMUs present within the DSP
subsystems on TI DRA7xx/AM57xx family of SoCs.
The main changes are to address the review comments on the registration of
the MMU devices with the IOMMU core. I have added logic in omap_iommu_probe
function to not register the second MMU device with the IOMMU core. There is
also only one iommu_group now and the iommu sysfs entries do not show the second
core anymore. Example output log given below.
I have chosen to make the modifications in the probe rather than the .add_device
callback as this is much simpler. It eliminates the need for additional logic for
refcounting (need the iommu_group allocation only for the first client) and moving
the iommu_group allocation out of probe. This also ensures the IOMMU device and
group registration is done during probe itself irrespective of whether there are
client nodes defined or not in the DTS (for the .add_device callbacks to be
effective).
Patches still based on your 4.13 arm/omap branch. DT representation and usage
details are the same as described in v1 [1].
regards
Suman
[1] https://marc.info/?l=linux-omap&m=150418532431811&w=2
Following is the output of sysfs with these MMUs exercised
with additional patches now:
root@am57xx-evm:~# dmesg | grep mmu
[ 0.520328] omap-iommu 40d01000.mmu: 40d01000.mmu registered
[ 0.520676] omap-iommu 40d02000.mmu: 40d02000.mmu registered
[ 0.521148] omap-iommu 58882000.mmu: 58882000.mmu registered
[ 0.521638] omap-iommu 55082000.mmu: 55082000.mmu registered
[ 0.522226] omap-iommu 41501000.mmu: 41501000.mmu registered
[ 0.522575] omap-iommu 41502000.mmu: 41502000.mmu registered
[ 0.523040] iommu: Adding device 58820000.ipu to group 1
[ 0.523192] iommu: Adding device 55020000.ipu to group 2
[ 0.523444] iommu: Adding device 40800000.dsp to group 0
[ 0.523841] iommu: Adding device 41000000.dsp to group 3
root@am57xx-evm:~# ls -l /sys/class/iommu/
lrwxrwxrwx 1 root root 0 Aug 8 03:59 40d01000.mmu -> ../../devices/platform/44000000.ocp/40d01000.mmu/iommu/40d01000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 41501000.mmu -> ../../devices/platform/44000000.ocp/41501000.mmu/iommu/41501000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 55082000.mmu -> ../../devices/platform/44000000.ocp/55082000.mmu/iommu/55082000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 58882000.mmu -> ../../devices/platform/44000000.ocp/58882000.mmu/iommu/58882000.mmu
root@am57xx-evm:~# ls -l /sys/kernel/iommu_groups/
drwxr-xr-x 3 root root 0 Aug 8 03:59 0
drwxr-xr-x 3 root root 0 Aug 8 03:59 1
drwxr-xr-x 3 root root 0 Aug 8 03:59 2
drwxr-xr-x 3 root root 0 Aug 8 03:59 3
root@am57xx-evm:~# ls -l /sys/kernel/iommu_groups/*/devices
/sys/kernel/iommu_groups/0/devices:
lrwxrwxrwx 1 root root 0 Aug 8 03:59 40800000.dsp -> ../../../../devices/platform/44000000.ocp/40800000.dsp
/sys/kernel/iommu_groups/1/devices:
lrwxrwxrwx 1 root root 0 Aug 8 03:59 58820000.ipu -> ../../../../devices/platform/44000000.ocp/58820000.ipu
/sys/kernel/iommu_groups/2/devices:
lrwxrwxrwx 1 root root 0 Aug 8 03:59 55020000.ipu -> ../../../../devices/platform/44000000.ocp/55020000.ipu
/sys/kernel/iommu_groups/3/devices:
lrwxrwxrwx 1 root root 0 Aug 8 03:59 41000000.dsp -> ../../../../devices/platform/44000000.ocp/41000000.dsp
root@am57xx-evm:~# ls -l /sys/kernel/iommu_groups/*/devices/*/
/sys/kernel/iommu_groups/0/devices/40800000.dsp/:
lrwxrwxrwx 1 root root 0 Aug 8 04:04 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r-- 1 root root 4096 Aug 8 03:59 driver_override
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu -> ../40d01000.mmu/iommu/40d01000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu_group -> ../../../../kernel/iommu_groups/0
-r--r--r-- 1 root root 4096 Aug 8 03:59 modalias
lrwxrwxrwx 1 root root 0 Aug 8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/dsp@40800000
drwxr-xr-x 2 root root 0 Aug 8 03:59 power
drwxr-xr-x 3 root root 0 Aug 8 04:04 remoteproc
lrwxrwxrwx 1 root root 0 Aug 8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r-- 1 root root 4096 Aug 8 03:59 uevent
/sys/kernel/iommu_groups/1/devices/58820000.ipu/:
lrwxrwxrwx 1 root root 0 Aug 8 04:04 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r-- 1 root root 4096 Aug 8 03:59 driver_override
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu -> ../58882000.mmu/iommu/58882000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu_group -> ../../../../kernel/iommu_groups/1
-r--r--r-- 1 root root 4096 Aug 8 03:59 modalias
lrwxrwxrwx 1 root root 0 Aug 8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/ipu@58820000
drwxr-xr-x 2 root root 0 Aug 8 03:59 power
drwxr-xr-x 3 root root 0 Aug 8 04:04 remoteproc
lrwxrwxrwx 1 root root 0 Aug 8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r-- 1 root root 4096 Aug 8 03:59 uevent
/sys/kernel/iommu_groups/2/devices/55020000.ipu/:
lrwxrwxrwx 1 root root 0 Aug 8 04:04 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r-- 1 root root 4096 Aug 8 03:59 driver_override
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu -> ../55082000.mmu/iommu/55082000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu_group -> ../../../../kernel/iommu_groups/2
-r--r--r-- 1 root root 4096 Aug 8 03:59 modalias
lrwxrwxrwx 1 root root 0 Aug 8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/ipu@55020000
drwxr-xr-x 2 root root 0 Aug 8 03:59 power
drwxr-xr-x 3 root root 0 Aug 8 04:04 remoteproc
lrwxrwxrwx 1 root root 0 Aug 8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r-- 1 root root 4096 Aug 8 03:59 uevent
/sys/kernel/iommu_groups/3/devices/41000000.dsp/:
lrwxrwxrwx 1 root root 0 Aug 8 04:04 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r-- 1 root root 4096 Aug 8 03:59 driver_override
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu -> ../41501000.mmu/iommu/41501000.mmu
lrwxrwxrwx 1 root root 0 Aug 8 03:59 iommu_group -> ../../../../kernel/iommu_groups/3
-r--r--r-- 1 root root 4096 Aug 8 03:59 modalias
lrwxrwxrwx 1 root root 0 Aug 8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/dsp@41000000
drwxr-xr-x 2 root root 0 Aug 8 03:59 power
drwxr-xr-x 3 root root 0 Aug 8 04:04 remoteproc
lrwxrwxrwx 1 root root 0 Aug 8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r-- 1 root root 4096 Aug 8 03:59 uevent
Suman Anna (2):
iommu/omap: Change the attach detection logic
iommu/omap: Add support to program multiple iommus
drivers/iommu/omap-iommu.c | 375 ++++++++++++++++++++++++++++++++++-----------
drivers/iommu/omap-iommu.h | 30 ++--
2 files changed, 296 insertions(+), 109 deletions(-)
--
2.13.1
next reply other threads:[~2017-09-05 22:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 22:56 Suman Anna [this message]
2017-09-05 22:56 ` [PATCH v2 1/2] iommu/omap: Change the attach detection logic Suman Anna
2017-09-05 22:56 ` [PATCH v2 2/2] iommu/omap: Add support to program multiple iommus Suman Anna
2017-09-19 9:32 ` [PATCH v2 0/2] Dual MMU support for TI DRA7xx DSPs 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=20170905225618.912-1-s-anna@ti.com \
--to=s-anna@ti.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=t-kristo@ti.com \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®