From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Suman Anna <s-anna@ti.com>, Florian Vaussard <florian.vaussard@epfl.ch>
Cc: linux-omap@vger.kernel.org, iommu@lists.linux-foundation.org,
sakari.ailus@iki.fi
Subject: Re: [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions
Date: Wed, 12 Mar 2014 16:26:11 +0100 [thread overview]
Message-ID: <2580372.d6ifzniBt8@avalon> (raw)
In-Reply-To: <1394239574-2389-1-git-send-email-laurent.pinchart@ideasonboard.com>
Hello,
Suman, Florian, any opinion regarding this patch series ? Your opinion on the
architecture-related question below would be appreciated as well, but I'd like
to get this merged first (and especially patch 5/5) in the not too distant
future to push OMAP3 ISP patches that depend on it.
On Saturday 08 March 2014 01:46:09 Laurent Pinchart wrote:
> Hello,
>
> This patch set fixes miscellaneous issues with the OMAP IOMMU driver, found
> when trying to port the OMAP3 ISP away from omap-iovmm to the ARM DMA API.
> The biggest issue is fixed by patch 5/5, while the other patches fix
> smaller problems that I've noticed when reading the code, without
> experiencing them at runtime.
>
> I'd like to take this as an opportunity to discuss OMAP IOMMU integration
> with the ARM DMA mapping implementation. The idea is to hide the IOMMU
> completely behind the DMA mapping API, making it completely transparent to
> drivers.
>
> A drivers will only need to allocate memory with dma_alloc_*, and behind the
> scene the ARM DMA mapping implementation will find out that the device is
> behind an IOMMU and will map the buffers through the IOMMU, returning an
> I/O VA address to the driver. No direct call to the OMAP IOMMU driver or to
> the IOMMU core should be necessary anymore.
>
> To use the IOMMU the ARM DMA implementation requires a VA mapping to be
> created with a call to arm_iommu_create_mapping() and to then be attached to
> the device with arm_iommu_attach_device(). This is currently not performed
> by the OMAP IOMMU driver, I have thus added that code to the OMAP3 ISP
> driver for now. I believe this to still be an improvement compared to the
> current situation, as it allows getting rid of custom memory allocation
> code in the OMAP3 ISP driver and custom I/O VA space management in
> omap-iovmm. However, that code should ideally be removed from the driver.
> The question is, where should it be moved to ?
>
> One possible solution would be to add the code to the OMAP IOMMU driver.
> However, this would require all OMAP IOMMU users to be converted to the ARM
> DMA API. I assume there would be issues that I don't foresee though.
>
> I'm not even sure whether the OMAP IOMMU driver would be the best place to
> put that code. Ideally VA spaces should be created by the platform somehow,
> and mapping of devices to IOMMUs should be handled by the IOMMU core
> instead of the IOMMU drivers. We're not there yet, and the path might not
> be straightforward, hence this attempt to start a constructive discussion.
>
> A second completely unrelated problem that I'd like to get feedback on is
> the suspend/resume support in the OMAP IOMMU driver, or rather the lack
> thereof. The driver exports omap_iommu_save_ctx() and
> omap_iommu_restore_ctx() functions and expects the IOMMU users to call them
> directly. This is really hackish to say the least. A proper suspend/resume
> implementation shouldn't be difficult to implement, and I'm wondering
> whether the lack of proper power management support comes from historical
> reasons only, or if there are problems I might not have considered.
>
> Last but not least, the patches are available at
>
> git://linuxtv.org/pinchartl/media.git omap3isp/dma
>
> along with a patch series that ports the OMAP3 ISP driver to the DMA API. I
> will submit that one for review once the IOMMU patches get accepted and
> after fixing a couple of remaining bugs (I'm aware that I have broken
> userspace PFNMAP buffers).
>
> Laurent Pinchart (5):
> iommu/omap: Use the cache cleaning API
> iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()
> iommu/omap: Flush the TLB only after updating translation table
> entries
> iommu/omap: Remove comment about supporting single page mappings only
> iommu/omap: Fix map protection value handling
>
> drivers/iommu/omap-iommu.c | 68 +++++++++++++++++--------------------------
> 1 file changed, 23 insertions(+), 45 deletions(-)
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2014-03-12 15:26 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-08 0:46 [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions Laurent Pinchart
2014-03-08 0:46 ` [PATCH 1/5] iommu/omap: Use the cache cleaning API Laurent Pinchart
[not found] ` <1394239574-2389-2-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-03-14 2:47 ` Suman Anna
2014-03-14 16:15 ` Santosh Shilimkar
2014-03-14 16:38 ` Laurent Pinchart
2014-03-14 17:51 ` Santosh Shilimkar
[not found] ` <5323418B.90805-l0cyMroinI0@public.gmane.org>
2014-03-15 1:49 ` Suman Anna
2014-03-15 17:54 ` Santosh Shilimkar
[not found] ` <532493DF.5010409-l0cyMroinI0@public.gmane.org>
2014-03-17 19:16 ` Suman Anna
2014-03-17 22:56 ` Laurent Pinchart
2014-03-14 16:57 ` Arnd Bergmann
2014-03-14 17:59 ` Santosh Shilimkar
[not found] ` <201403141757.48824.arnd-r2nGTMty4D4@public.gmane.org>
2014-03-17 23:12 ` Laurent Pinchart
2014-03-18 1:20 ` Suman Anna
[not found] ` <1394239574-2389-1-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-03-08 0:46 ` [PATCH 2/5] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page() Laurent Pinchart
[not found] ` <1394239574-2389-3-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-03-13 22:16 ` Suman Anna
2014-03-14 9:50 ` Laurent Pinchart
2014-03-08 0:46 ` [PATCH 3/5] iommu/omap: Flush the TLB only after updating translation table entries Laurent Pinchart
[not found] ` <1394239574-2389-4-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-03-13 22:27 ` Suman Anna
[not found] ` <532230DA.30302-l0cyMroinI0@public.gmane.org>
2014-03-14 9:58 ` Laurent Pinchart
2014-03-15 0:18 ` Suman Anna
2014-03-14 2:33 ` [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions Suman Anna
2014-03-14 11:00 ` Laurent Pinchart
2014-03-16 21:54 ` Sakari Ailus
[not found] ` <20140316215455.GA2108-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2014-03-17 19:58 ` Suman Anna
2014-03-17 22:44 ` Laurent Pinchart
2014-04-04 12:23 ` Marek Szyprowski
[not found] ` <533EA45D.70002-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-08 13:09 ` Laurent Pinchart
2014-04-04 10:18 ` Joerg Roedel
[not found] ` <20140404101811.GR13491-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-04-08 12:50 ` Laurent Pinchart
2014-04-08 13:43 ` Joerg Roedel
2014-04-08 15:02 ` Laurent Pinchart
2014-04-09 15:08 ` Joerg Roedel
2014-04-10 23:30 ` Laurent Pinchart
2014-03-08 0:46 ` [PATCH 4/5] iommu/omap: Remove comment about supporting single page mappings only Laurent Pinchart
2014-03-08 0:46 ` [PATCH 5/5] iommu/omap: Fix map protection value handling Laurent Pinchart
[not found] ` <1394239574-2389-6-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-03-14 0:07 ` Suman Anna
2014-03-14 9:46 ` Laurent Pinchart
2014-03-15 0:16 ` Suman Anna
2014-03-08 11:04 ` [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions Sakari Ailus
2014-03-12 15:26 ` Laurent Pinchart [this message]
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=2580372.d6ifzniBt8@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=florian.vaussard@epfl.ch \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-anna@ti.com \
--cc=sakari.ailus@iki.fi \
/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.