Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager

2010-07-10 Thread Joerg Roedel
On Fri, Jul 02, 2010 at 12:09:02AM -0700, Zach Pfeffer wrote: Hari Kanigeri wrote: He demonstrated the usage of his code in one of the emails he sent out initially. Did you go over that, and what (or how many) step would you use with the current code to do the same thing? -- So is this

Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager

2010-07-10 Thread Joerg Roedel
On Thu, Jul 01, 2010 at 03:00:17PM -0700, Zach Pfeffer wrote: Additionally, the current IOMMU interface does not allow users to associate one page table with multiple IOMMUs [...] Thats not true. Multiple IOMMUs are completly handled by the IOMMU drivers. In the case of the IOMMU-API backend

Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager

2010-07-10 Thread Joerg Roedel
On Fri, Jul 02, 2010 at 12:33:51AM -0700, Zach Pfeffer wrote: Daniel Walker wrote: So if we include this code which map implementations could you collapse into this implementations ? Generally , what currently existing code can VCMM help to eliminate? In theory, it can eliminate all

Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager

2010-07-10 Thread Joerg Roedel
On Thu, Jul 01, 2010 at 11:17:34PM -0700, Zach Pfeffer wrote: Andi Kleen wrote: Hmm? dma_map_* does not change any CPU mappings. It only sets up DMA mapping(s). Sure, but I was saying that iommu_map() doesn't just set up the IOMMU mappings, its sets up both the iommu and kernel buffer

Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager

2010-07-14 Thread Joerg Roedel
On Mon, Jul 12, 2010 at 10:21:05PM -0700, Zach Pfeffer wrote: Joerg Roedel wrote: The DMA-API already does this with the help of IOMMUs if they are present. What is the benefit of your approach over that? The grist to the DMA-API mill is the opaque scatterlist. Each scatterlist element

[PATCH] arm: omap: Fix build error in ispccdc.c

2011-09-06 Thread Joerg Roedel
the problem. Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-me...@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/media/video/omap3isp/ispccdc.c

[PATCH] iommu/omap: Fix build error with !IOMMU_SUPPORT

2011-09-14 Thread Joerg Roedel
...@wizery.com Cc: io...@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/Kconfig |4 ++-- drivers/media/video/Kconfig |3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/Kconfig b

Re: [PATCH v4 0/7] iommu: split mapping to page sizes as supported by the hardware

2011-11-08 Thread Joerg Roedel
On Tue, Nov 08, 2011 at 02:57:02PM +0200, Ohad Ben-Cohen wrote: Joerg, gentle reminder. thanks. Just wanted to wait until -rc1 is out and I can start merging new stuff :) Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General

[PATCH] arm: cpuidle34xx.c: Fix compile error

2011-11-08 Thread Joerg Roedel
Add missing module.h include to provide THIS_MODULE. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/arm/mach-omap2/cpuidle34xx.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index

Re: [PATCH v4 0/7] iommu: split mapping to page sizes as supported by the hardware

2011-11-08 Thread Joerg Roedel
On Tue, Nov 08, 2011 at 04:03:09PM +0200, Ohad Ben-Cohen wrote: On Tue, Nov 8, 2011 at 4:01 PM, Joerg Roedel joerg.roe...@amd.com wrote: On Tue, Nov 08, 2011 at 02:57:02PM +0200, Ohad Ben-Cohen wrote: Joerg, gentle reminder. thanks. Just wanted to wait until -rc1 is out and I can start

Re: [PATCH] iommu: omap: fix compile failure

2011-11-08 Thread Joerg Roedel
On Tue, Nov 08, 2011 at 06:29:15PM +0800, tom.leim...@gmail.com wrote: From: Ming Lei tom.leim...@gmail.com Fix the failure below: Applied with a shorter commit-msg. Thanks. -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers:

Re: [PATCH] arm: cpuidle34xx.c: Fix compile error

2011-11-08 Thread Joerg Roedel
On Tue, Nov 08, 2011 at 09:36:48AM -0800, Kevin Hilman wrote: Joerg Roedel joerg.roe...@amd.com writes: Add missing module.h include to provide THIS_MODULE. Signed-off-by: Joerg Roedel joerg.roe...@amd.com FYI... Tony has already queued fix for this in his fixes branch. http

Re: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware

2011-11-10 Thread Joerg Roedel
On Thu, Nov 10, 2011 at 08:16:16PM +0800, cody wrote: On 11/10/2011 03:31 PM, Ohad Ben-Cohen wrote: On Thu, Nov 10, 2011 at 8:17 AM, Kai Huangmail.kai.hu...@gmail.com wrote: Seems the unmap function don't take phys as parameter, does this mean domain-ops-unmap will walk through the page table

Re: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware

2011-11-10 Thread Joerg Roedel
On Thu, Nov 10, 2011 at 10:35:34PM +0800, cody wrote: Yes I totally agree page-size is not required for unmap operations and should not be added as parameter to map/unmap operations. I am not saying the unmap operation, but the IOTLB flush operation. My point is we also may also need to add

Re: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware

2011-11-10 Thread Joerg Roedel
On Thu, Nov 10, 2011 at 03:28:50PM +, David Woodhouse wrote: Which brings me to another question I have been pondering... do we even have a consensus on exactly *when* the IOTLB should be flushed? Well, sort of, there is still the outstanding idea of the iommu_commit() interface for the

Re: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware

2011-11-11 Thread Joerg Roedel
On Thu, Nov 10, 2011 at 07:28:39PM +, David Woodhouse wrote: ... which implies that a mapping, once made, might *never* actually get torn down until we loop and start reusing address space? That has interesting security implications. Yes, it is a trade-off between security and

Changing IOMMU-API for generic DMA-mapping supported by the hardware

2011-11-11 Thread Joerg Roedel
Okay, seperate thread for this one. On Thu, Nov 10, 2011 at 07:28:39PM +, David Woodhouse wrote: The plan is to have a single DMA-API implementation for all IOMMU drivers (X86 and ARM) which just uses the IOMMU-API. But to make this performing reasonalbly well a few changes to the

Re: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware

2011-11-11 Thread Joerg Roedel
On Thu, Nov 10, 2011 at 01:12:00PM -0800, Stepan Moskovchenko wrote: I have been experimenting with an iommu_map_range call, which maps a given scatterlist of discontiguous physical pages into a contiguous virtual region at a given IOVA. This has some performance advantages over just calling

Re: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware

2011-11-11 Thread Joerg Roedel
On Fri, Nov 11, 2011 at 01:27:28PM +, David Woodhouse wrote: On Fri, 2011-11-11 at 13:58 +0100, Joerg Roedel wrote: For AMD IOMMU there is a feature called not-present cache. It says that the IOMMU caches non-present entries as well and needs an IOTLB flush when something is mapped

Re: [PATCH v4-rebased 0/7] iommu: split mapping to page sizes as supported by the hardware

2011-11-15 Thread Joerg Roedel
On Thu, Nov 10, 2011 at 11:32:24AM +0200, Ohad Ben-Cohen wrote: Ohad Ben-Cohen (7): iommu/core: stop converting bytes to page order back and forth iommu/core: split mapping to page sizes as supported by the hardware iommu/omap: announce supported page sizes iommu/msm: announce

Re: Changing IOMMU-API for generic DMA-mapping supported by the hardware

2011-11-24 Thread 'Joerg Roedel'
On Thu, Nov 24, 2011 at 01:52:33PM +0100, Marek Szyprowski wrote: In my DMA-mapping IOMMU integration I've used a dma_iommu_mapping structure, which contains a pointer to iommu domain, a bitmap and a lock. Maybe we should consider extending iommu domain with allocation bitmap (or other

Re: [PATCH 0/6] OMAP: iommu: hwmod, reset handling and runtime PM

2012-07-17 Thread Joerg Roedel
On Fri, Jun 15, 2012 at 08:55:58PM -0500, Omar Ramirez Luna wrote: Omar Ramirez Luna (6): ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected ARM: OMAP3: hwmod data: add mmu data for iva and isp ARM: OMAP4: hwmod data: add mmu hwmod for ipu and dsp ARM: OMAP3/4: iommu:

Re: [PATCH] iommu/core: pass a user-provided token to fault handlers

2012-05-23 Thread Joerg Roedel
On Mon, May 21, 2012 at 08:20:05PM +0300, Ohad Ben-Cohen wrote: Sometimes a single IOMMU user may have to deal with several different IOMMU devices (e.g. remoteproc). When an IOMMU fault happens, such users have to regain their context in order to deal with the fault. Users can't use the

[PATCH 1/2] iommu: Move iommu Kconfig entries to submenu

2011-06-22 Thread Joerg Roedel
For better navigation this patch moves the drivers/iommu drivers into its own submenu in Kconfig. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/Kconfig | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu

[PATCH 2/2] iommu/amd: Move missing parts to drivers/iommu

2011-06-22 Thread Joerg Roedel
A few parts of the driver were missing in drivers/iommu. Move them there to have the complete driver in that directory. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kernel/Makefile |1 - drivers/iommu/Makefile |2

Re: [PATCH v2 0/4] drivers/iommu/ relocations

2011-06-22 Thread Joerg Roedel
Okay, I applied the patches to move forward with them. On-top I also put two additional patches which are sent as a follow-up to this mail. These changes are at git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git in the core branch. Thanks, Joerg -- To unsubscribe

Re: [PATCH v2 2/2] iommu/omap: fix NULL pointer dereference

2012-02-23 Thread Joerg Roedel
-Cohen o...@wizery.com Cc: Tony Lindgren t...@atomide.com Cc: Hiroshi Doyu hd...@nvidia.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Russell King li...@arm.linux.org.uk Cc: Joerg Roedel joerg.roe...@amd.com --- v2: omap_find_iovm_area only returns NULL for errors. thanks, rmk

Re: [PATCH v2 2/2] iommu/omap: fix NULL pointer dereference

2012-02-23 Thread Joerg Roedel
On Thu, Feb 23, 2012 at 06:16:59PM +0200, Ohad Ben-Cohen wrote: On Thu, Feb 23, 2012 at 6:11 PM, Joerg Roedel joerg.roe...@amd.com wrote: I guess these patches are 3.3 material? Yes. How about tagging them for stable too? Good point. But it's only relevant for this 2nd patch (the NULL

Re: [PATCH v2 2/2] iommu/omap: fix NULL pointer dereference

2012-02-24 Thread Joerg Roedel
On Thu, Feb 23, 2012 at 06:16:59PM +0200, Ohad Ben-Cohen wrote: On Thu, Feb 23, 2012 at 6:11 PM, Joerg Roedel joerg.roe...@amd.com wrote: I guess these patches are 3.3 material? Yes. How about tagging them for stable too? Good point. But it's only relevant for this 2nd patch (the NULL

Re: [PATCH] ARM: OMAP: fix iommu, not mailbox

2012-03-05 Thread Joerg Roedel
On Sun, Mar 04, 2012 at 12:01:11PM +0200, Ohad Ben-Cohen wrote: For some weird (freudian?) reason, commit 435792d ARM: OMAP: make iommu subsys_initcall to fix builtin omap3isp unintentionally changed the mailbox's initcall instead of the iommu's. Fix that. Applied, thanks. -- AMD

Re: [PATCH] iommu: OMAP: device detach on domain destroy

2012-04-12 Thread Joerg Roedel
and internal iommu object. In order to detach the users we need to track devices using the iommu, current use cases only have one user of iommu per instance. When required this can evolve to a list with the devices using the iommu_dev. Reported-by: Joerg Roedel j...@8bytes.org Reviewed-by: Ohad Ben

Re: [PATCH v2] iommu: OMAP: device detach on domain destroy

2012-04-19 Thread Joerg Roedel
and internal iommu object. In order to detach the users we need to track devices using the iommu, current use cases only have one user of iommu per instance. When required this can evolve to a list with the devices using the iommu_dev. Reported-by: Joerg Roedel j...@8bytes.org Reviewed-by: Ohad Ben

Re: [PATCH] ARM: OMAP3: fix build on !CONFIG_IOMMU_API

2012-01-13 Thread Joerg Roedel
On Wed, Jan 11, 2012 at 03:28:11PM +0200, Ohad Ben-Cohen wrote: omap3isp depends on CONFIG_IOMMU_API, so avoid registering its device (and defining its configuration structs) on !CONFIG_IOMMU_API. This is generally nice to have, but more importantly, it fixes:

Re: [PATCH] ARM: OMAP3: fix build on !CONFIG_IOMMU_API

2012-01-13 Thread Joerg Roedel
On Fri, Jan 13, 2012 at 05:54:10PM +0200, Ohad Ben-Cohen wrote: On Fri, Jan 13, 2012 at 1:07 PM, Joerg Roedel joerg.roe...@amd.com wrote: Will apply it as soon as the merge window closes. Though we might want to consider sending this to Linus before rc1, to eliminate global developers' pain

Re: [PATCH] ARM: OMAP3: fix build on !CONFIG_IOMMU_API

2012-01-16 Thread Joerg Roedel
On Wed, Jan 11, 2012 at 03:28:11PM +0200, Ohad Ben-Cohen wrote: omap3isp depends on CONFIG_IOMMU_API, so avoid registering its device (and defining its configuration structs) on !CONFIG_IOMMU_API. This is generally nice to have, but more importantly, it fixes:

Re: [PATCH v5 0/6] Move rest of omap-iommu to live in drivers/iommu

2012-11-17 Thread Joerg Roedel
of the way of iommu development. Okay, from my side: Acked-by: Joerg Roedel j...@8bytes.org Please let me know which branch I need to pull into my tree when you merged these patches. Joerg -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message

Re: [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions

2014-04-04 Thread Joerg Roedel
On Fri, Mar 14, 2014 at 12:00:16PM +0100, Laurent Pinchart wrote: Right, we indeed need two levels of API, one for drivers such as remoteproc that need direct control of the IOMMU, and one for drivers that only need to map buffers without any additional requirement. In the second case the

Re: [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions

2014-04-08 Thread Joerg Roedel
Hi Laurent, On Tue, Apr 08, 2014 at 02:50:38PM +0200, Laurent Pinchart wrote: I agree with you, the two levels are already present, but there's still rough edges that we need to soften. The ARM DMA API implementation requires someone to create the VA space mapping by calling

Re: [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions

2014-04-09 Thread Joerg Roedel
On Tue, Apr 08, 2014 at 05:02:37PM +0200, Laurent Pinchart wrote: On Tuesday 08 April 2014 15:43:22 Joerg Roedel wrote: Who is someone in this case? That's exactly the problem :-) The ARM DMA API implementation doesn't care who that someone is. Existing implementations call those

Re: [GIT PULL FOR v3.16] OMAP IOMMU fixes

2014-04-16 Thread Joerg Roedel
Hi Laurent, On Fri, Apr 04, 2014 at 12:11:52AM +0200, Laurent Pinchart wrote: Laurent Pinchart (3): iommu/omap: Fix 'no page for' debug message in flush_iotlb_page() iommu/omap: Remove comment about supporting single page mappings only iommu/omap: Fix map protection value

Re: [GIT PULL v2 FOR v3.16] OMAP IOMMU fixes

2014-04-16 Thread Joerg Roedel
On Wed, Apr 16, 2014 at 04:51:56PM +0200, Laurent Pinchart wrote: The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5: Linux 3.15-rc1 (2014-04-13 14:18:35 -0700) are available in the git repository at: git://linuxtv.org/pinchartl/media.git iommu/omap for

Re: [PATCH v2 0/3] iommu: Remove OMAP IOVMM driver

2014-07-23 Thread Joerg Roedel
On Mon, Jul 21, 2014 at 11:19:29PM -0700, Tony Lindgren wrote: Tony, is there still time to get this (and especially patch 2/3, which touches arch/ code) in v3.17 ? Yes as long as Joerg is OK to merge that branch in :) Fine with me, I can take only patch 1 or all 3 into my arm/omap

Re: [PATCH v2 0/3] iommu: Remove OMAP IOVMM driver

2014-07-29 Thread Joerg Roedel
On Wed, Jul 23, 2014 at 04:00:47PM +0200, Laurent Pinchart wrote: Thank you. Assuming there's currently no conflict to be resolved, I believe the easiest would be for both you and Tony to merge my branch in your trees. Okay, I applied the patches to my arm/omap branch. I will push them out

Re: [PATCHv2 0/2] OMAP IOMMU Fixes for DT-clients

2014-09-05 Thread Joerg Roedel
On Thu, Sep 04, 2014 at 05:27:28PM -0500, Suman Anna wrote: Suman Anna (2): iommu/omap: Check for valid archdata in attach_dev iommu/omap: Fix iommu archdata name for DT-based devices drivers/iommu/omap-iommu.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-)

Re: [PATCH 2/2] iommu/omap: Remove omap_iommu unused owner field

2014-09-25 Thread Joerg Roedel
On Tue, Sep 09, 2014 at 06:45:45PM +0300, Laurent Pinchart wrote: The owner field is never set. Remove it. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/iommu/omap-iommu.c | 11 --- drivers/iommu/omap-iommu.h | 1 - 2 files changed, 12 deletions(-)

Re: [PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-10-22 Thread Joerg Roedel
On Tue, Oct 21, 2014 at 04:28:27PM -0500, Suman Anna wrote: I am looking to refresh this series for 3.19, and this is the only patch that may need some changes. Please let me know what your preference is, and I can rework this patch if needed. Either way, the plan is to not have an OMAP IOMMU

Re: [PATCH v2 00/17] OMAP IOMMU Cleanup Consolidation

2014-10-23 Thread Joerg Roedel
On Wed, Oct 22, 2014 at 05:22:18PM -0500, Suman Anna wrote: Suman Anna (17): iommu/omap: Remove refcount field from omap_iommu object iommu/omap: Remove unused isr_priv field from omap_iommu iommu/omap: Remove duplicate declarations iommu/omap: Remove conditional definition of

Re: [PATCH 0/2] DRA7 DSP MMU config support

2015-08-03 Thread Joerg Roedel
On Tue, Jul 21, 2015 at 06:55:34PM -0500, Suman Anna wrote: The patches are baselined on 4.2-rc3 + the recent OMAP IOMMU cleanup series [1]. I will post the DTS patches separately to allow Tony to pick them up independently. From the discussion it looks like some more work is necessary here.

Re: [PATCH 00/11] Some OMAP IOMMU cleanup patches

2015-08-03 Thread Joerg Roedel
On Mon, Jul 20, 2015 at 05:33:22PM -0500, Suman Anna wrote: Suman Anna (11): Documentation: dt: Add #iommu-cells info to OMAP iommu bindings iommu/omap: Remove all module references iommu/omap: Move debugfs functions to omap-iommu-debug.c iommu/omap: Protect omap-iopgtable.h against

Re: next-20150806 build: 2 failures 52 warnings (next-20150806)

2015-08-06 Thread Joerg Roedel
On Thu, Aug 06, 2015 at 07:01:56PM +0100, Mark Brown wrote: On Thu, Aug 06, 2015 at 12:00:47PM +0100, Build bot for Mark Brown wrote: Today's linux-next fails to build an ARM allmodconfig with: ../drivers/iommu/omap-iommu-debug.c:138:2: error: void value not ignored as it ought to be

Re: [REPOST PATCH 0/2] DRA7 DSP MMU config support

2015-10-14 Thread Joerg Roedel
On Fri, Oct 02, 2015 at 06:02:42PM -0500, Suman Anna wrote: > Suman Anna (2): > Documentation: dt: Update OMAP iommu bindings for DRA7 DSPs > iommu/omap: Add support for configuring dsp iommus on DRA7xx > > .../devicetree/bindings/iommu/ti,omap-iommu.txt| 27 ++ >