Re: [PATCHv9 6/6] dmaengine: rcar-dmac: add iommu support for slave transfers

2017-01-01 Thread Laurent Pinchart
Hi Niklas, On Monday 05 Sep 2016 12:52:44 Laurent Pinchart wrote: > On Wednesday 10 Aug 2016 13:22:19 Niklas Söderlund wrote: > > Enable slave transfers to a device behind a IPMMU by mapping the slave > > addresses using the dma-mapping API. > > > > Sign

Re: [PATCH] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-15 Thread Laurent Pinchart
llocate and export buffers from the device with the strictest requirements, or to implement a central buffer allocator. In any case, I don't think DMA_ATTR_FORCE_CONTIGUOUS is the right solution to that problem. Forcing contiguous allocation can however help with performance optimization, as mapping physically co

Re: [PATCH v2 2/2] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-01-28 Thread Laurent Pinchart
0)); > + if (!addr) > + iommu_dma_free(dev, pages, iosize, handle); > } > return addr; > } > @@ -626,6 +642,8 @@ static void __iommu_free_attrs(struct device *dev, > size_t size, void *cpu_addr, size = PAGE_ALIGN(size); > /* >* @cpu_add

Re: [PATCH v2] iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space

2017-02-01 Thread Laurent Pinchart
ometry to fix this. > > Signed-off-by: Geert Uytterhoeven > Reviewed-by: Robin Murphy Reviewed-by: Laurent Pinchart > --- > v2: > - Add Reviewed-by. > --- > drivers/iommu/ipmmu-vmsa.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iomm

Re: [PATCH] iommu/ipmmu-vmsa: Add r8a7795 DT binding

2017-02-03 Thread Laurent Pinchart
pt bit number associated with the particular cache IPMMU > device. > +The interrupt bit number needs to match the main IPMMU IMSSTR register. > +Only used by cache IPMMU instances. > + > + > Each bus master connected to an IPMMU must reference the IPMMU in its > device node with the following property: -- Regards, Laurent Pinchart ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-15 Thread Laurent Pinchart
Hi Sricharan, On Wednesday 03 May 2017 15:54:59 Sricharan R wrote: > On 5/3/2017 3:24 PM, Robin Murphy wrote: > > On 02/05/17 19:35, Geert Uytterhoeven wrote: > >> On Fri, Feb 3, 2017 at 4:48 PM, Sricharan R wrote: > >>> From: Laurent Pinchart > >>>

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-15 Thread Laurent Pinchart
Hi Sricharan, On Monday 15 May 2017 23:37:16 Laurent Pinchart wrote: > On Wednesday 03 May 2017 15:54:59 Sricharan R wrote: > > On 5/3/2017 3:24 PM, Robin Murphy wrote: > >> On 02/05/17 19:35, Geert Uytterhoeven wrote: > >>> On Fri, Feb 3, 2017 at 4:48 PM, Sricharan

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-16 Thread Laurent Pinchart
Hi Sricharan, On Tuesday 16 May 2017 07:53:57 sricha...@codeaurora.org wrote: > On 2017-05-16 03:04, Laurent Pinchart wrote: > > On Monday 15 May 2017 23:37:16 Laurent Pinchart wrote: > >> On Wednesday 03 May 2017 15:54:59 Sricharan R wrote: > >>> On 5/3/20

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-16 Thread Laurent Pinchart
Hi Sricharan, On Tuesday 16 May 2017 19:10:03 sricha...@codeaurora.org wrote: > On 2017-05-16 12:47, Laurent Pinchart wrote: > > On Tuesday 16 May 2017 07:53:57 sricha...@codeaurora.org wrote: > >> On 2017-05-16 03:04, Laurent Pinchart wrote: > >>> On Monday 15 May

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-16 Thread Laurent Pinchart
Hi Robin, On Tuesday 16 May 2017 15:04:55 Robin Murphy wrote: > On 16/05/17 08:17, Laurent Pinchart wrote: > > On Tuesday 16 May 2017 07:53:57 sricha...@codeaurora.org wrote: [snip] > >> arch_teardown_dma_ops() being the inverse of arch_setup_dma_ops() > >> ,dma_o

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-16 Thread Laurent Pinchart
Hi Sricharan, On Tuesday 16 May 2017 19:59:01 sricha...@codeaurora.org wrote: > On 2017-05-16 19:40, Laurent Pinchart wrote: > > On Tuesday 16 May 2017 15:04:55 Robin Murphy wrote: > >> On 16/05/17 08:17, Laurent Pinchart wrote: > >> > On Tuesday 16 May 2017 07:

[PATCH] ARM: dma-mapping: Don't tear third-party mappings

2017-05-16 Thread Laurent Pinchart
68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Laurent Pinchart --- arch/arm/include/asm/device.h | 3 ++- arch/arm/mm/dma-mapping.c | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/device.h b/arch

Re: [PATCH] ARM: dma-mapping: Don't tear third-party mappings

2017-05-16 Thread Laurent Pinchart
Hi Robin, On Tuesday 16 May 2017 16:47:36 Robin Murphy wrote: > On 16/05/17 16:14, Laurent Pinchart wrote: > > arch_setup_dma_ops() is used in device probe code paths to create an > > IOMMU mapping and attach it to the device. The function assumes that the > > device is

Re: [PATCH V2 1/3] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-18 Thread Laurent Pinchart
Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred > probing or error") Signed-off-by: Sricharan R > Reported-by: Geert Uytterhoeven > Tested-by: Will Deacon > Tested-by: Magnus Damn > Acked-by: Will Deacon Reviewed-by: Laurent Pinchart >

Re: [PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Laurent Pinchart
/* Ignore all other errors apart from EPROBE_DEFER */ > + if (IS_ERR(ops) && (PTR_ERR(ops) != -EPROBE_DEFER)) { > + dev_info(dev, "Adding to IOMMU failed: %ld\n", PTR_ERR(ops)); > + ops = NULL; > + } > + > return ops; > } -- Regards, Laurent P

Re: [PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Laurent Pinchart
Hi Sricharan, On Thursday 18 May 2017 17:26:14 Sricharan R wrote: > On 5/18/2017 4:09 PM, Laurent Pinchart wrote: > > On Thursday 18 May 2017 15:37:09 Sricharan R wrote: > >> While deferring the probe of IOMMU masters, > >> xlate and add_device callback can pass

Re: [PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Laurent Pinchart
Hi Sricharan On Thursday 18 May 2017 19:08:12 Sricharan R wrote: > On 5/18/2017 6:00 PM, Laurent Pinchart wrote: > > On Thursday 18 May 2017 17:26:14 Sricharan R wrote: > >> On 5/18/2017 4:09 PM, Laurent Pinchart wrote: > >>> On Thursday 18 May 2017 15:37:09 S

Re: [PATCH V4 2/4] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Laurent Pinchart
concern and let the master work without IOMMU, thus > restoring the old behavior. > > Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred > probing or error") Reported-by: Geert Uytterhoeven > Tested-by: Magnus Damn > Signed-off-by: Sricharan R Revi

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-23 Thread Laurent Pinchart
n v4.12-rc1 and breaks IOMMU operations on several platforms. We need a fix for v4.12-rc that should be as nonintrusive as possible, as a larger cleanup is likely not -rc material. Beside reverting the whole series, the simplest option I came up with was [1]. Note that this is not the only fix needed to fix v4.12-rc1 IOMMU breakage, there are four more patches in the series that Sricharan plans to get merged soon. I don't think there are dependencies between the other four drivers/ patches and the arch/arm/ patch, so the latter could be merged independently through your tree as soon as it's deemed ready. [1] https://www.spinics.net/lists/arm-kernel/msg583019.html -- Regards, Laurent Pinchart ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-24 Thread Laurent Pinchart
Hello, On Wednesday 24 May 2017 16:01:45 Sricharan R wrote: > On 5/24/2017 4:12 AM, Russell King - ARM Linux wrote: > > On Wed, May 24, 2017 at 12:46:51AM +0300, Laurent Pinchart wrote: > >> On Tuesday 23 May 2017 18:53:19 Russell King - ARM Linux wrote: > >>> On T

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-26 Thread Laurent Pinchart
Hi Russell, On Thursday 25 May 2017 16:05:41 Russell King - ARM Linux wrote: > On Wed, May 24, 2017 at 02:26:13PM +0300, Laurent Pinchart wrote: > > Again, the patch I propose is the simplest v4.12-rc fix I can think of, > > short of reverting your complete IOMMU probe deferr

Re: [PATCH v2] arm: dma-mapping: Reset the device's dma_ops

2017-05-26 Thread Laurent Pinchart
figure dma operations at probe time for > platform/amba/pci bus devices") Reviewed-by: Laurent Pinchart Could you please push this upstream along with "[PATCH] ARM: dma-mapping: Don't tear third-party mappings" ? (And feel free to s/tear/tear down/ in the subject of that p

Re: [PATCH v5 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules

2013-01-07 Thread Laurent Pinchart
t; + dev_err(&pdev->dev, "ioremap_nocache failed\n"); > + return -ENOMEM; > + } > + ipmmu->dev_names = pdata->dev_names; > + ipmmu->num_dev_names = pdata->num_dev_names; > + platform_set_drvdata(pdev, ipmmu); > + ipmmu_r

[PATCH 00/19] Enable various Renesas drivers on all ARM platforms

2013-10-28 Thread Laurent Pinchart
ux-...@vger.kernel.org Cc: linux-ser...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: Magnus Damm Cc: Mark Brown Cc: Mauro Carvalho Chehab Cc: net...@vger.kernel.org Cc: Samuel Ortiz Cc: Sergei Shtylyov Cc: Thierry Reding Cc: Tomi Valkeinen Cc: Vinod Koul Cc: Wolfram Sang Cc: Zhang R

[PATCH 05/19] iommu: shmobile: Enable the driver on all ARM platforms

2013-10-28 Thread Laurent Pinchart
@lists.linux-foundation.org Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index c880eba..3e7fdbb 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -206,7 +206,7

Re: [PATCH 00/19] Enable various Renesas drivers on all ARM platforms

2013-10-29 Thread Laurent Pinchart
Hi Simon and Guennadi, On Tuesday 29 October 2013 10:12:17 Guennadi Liakhovetski wrote: > On Tue, 29 Oct 2013, Laurent Pinchart wrote: > > Hello, > > > > This patch series, based on v3.12-rc7, prepares various Renesas drivers > > for migration to multiplatfor

Re: [PATCH 00/19] Enable various Renesas drivers on all ARM platforms

2013-10-29 Thread Laurent Pinchart
Hi Artem, On Tuesday 29 October 2013 15:06:20 Artem Bityutskiy wrote: > On Tue, 2013-10-29 at 10:12 +0100, Guennadi Liakhovetski wrote: > > On Tue, 29 Oct 2013, Laurent Pinchart wrote: > > > Hello, > > > > > > This patch series, based on v3.12-rc7, prepar

Re: [PATCH 00/19] Enable various Renesas drivers on all ARM platforms

2013-10-29 Thread Laurent Pinchart
arget architecture. Now that we have a COMPILE_TEST Kconfig option, my preference would thus go to SUPERH || ARM || COMPILE_TEST over no dependency at all. -- Regards, Laurent Pinchart signature.asc Description: This is a digitally signed message part.

Re: [PATCH 00/19] Enable various Renesas drivers on all ARM platforms

2013-10-29 Thread Laurent Pinchart
Hi Mark, On Tuesday 29 October 2013 10:23:31 Mark Brown wrote: > On Tue, Oct 29, 2013 at 06:05:53PM +0100, Laurent Pinchart wrote: > > The first one is that I can't compile-test all those drivers on all > > architectures. The spi-sh-msiof driver, for instance, uses &

[PATCH v2 05/19] iommu: shmobile: Enable the driver on all ARM platforms

2013-10-29 Thread Laurent Pinchart
Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index c880eba..9fd51e5 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu

[PATCH v2 00/19] Enable various Renesas drivers on all ARM platforms

2013-10-29 Thread Laurent Pinchart
ux-ker...@vger.kernel.org Cc: linux-me...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-...@lists.infradead.org Cc: linux...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-ser...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: net...@vger.kernel.org Laurent Pinchart (19): s

[PATCH v3] iommu: shmobile: Enable the driver on all ARM platforms

2013-10-30 Thread Laurent Pinchart
_TEST support as the driver doesn't compile on non-ARM platforms due to usage of the ARM DMA IOMMU API. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu

Re: [PATCH v3] iommu: shmobile: Enable the driver on all ARM platforms

2013-10-30 Thread Laurent Pinchart
Hi Russell, [CC'ing Mark Brown] On Wednesday 30 October 2013 11:26:25 Russell King - ARM Linux wrote: > On Wed, Oct 30, 2013 at 12:20:43PM +0100, Laurent Pinchart wrote: > > Renesas ARM platforms are transitioning from single-platform to > > multi-platform k

Re: [PATCH v3] iommu: shmobile: Enable the driver on all ARM platforms

2013-11-05 Thread Laurent Pinchart
On Wednesday 30 October 2013 09:28:54 Mark Brown wrote: > On Wed, Oct 30, 2013 at 12:40:12PM +0100, Laurent Pinchart wrote: > > > For similar reasons as x86, can we please think about using: > > > depends on ARM > > > depends on ARCH_SHMOBILE || ARCH_SHMOBILE_MULT

Re: [PATCH v2 00/19] Enable various Renesas drivers on all ARM platforms

2013-11-12 Thread Laurent Pinchart
Hello, On Tuesday 29 October 2013 23:37:35 Laurent Pinchart wrote: > Hello, > > This patch series, based on v3.12-rc7, prepares various Renesas drivers > for migration to multiplatform kernels by enabling their compilation or > otherwise fixing them on all ARM platforms. The pat

[PATCH 04/15] iommu: shmobile: Enable driver compilation with COMPILE_TEST

2013-11-26 Thread Laurent Pinchart
This helps increasing build testing coverage. The driver doesn't compile on non-ARM platforms due to usage of the ARM DMA IOMMU API, restrict compilation to ARM. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig | 1 + 1

[PATCH 00/15] Enable compilation of various Renesas drivers with COMPILE_TEST

2013-11-26 Thread Laurent Pinchart
oul Cc: Wolfram Sang Cc: Zhang Rui Laurent Pinchart (15): i2c: shmobile/rcar: Restrict non-COMPILE_TEST compilation input: sh_keysc: Restrict non-COMPILE_TEST compilation serial: sh-sci: Restrict non-COMPILE_TEST compilation iommu: shmobile: Enable driver compilation with COMPILE_TEST

Re: [PATCH 04/15] iommu: shmobile: Enable driver compilation with COMPILE_TEST

2013-12-11 Thread Laurent Pinchart
Hi Joerg, Could you please pick this patch up for v3.14 ? On Thursday 28 November 2013 16:36:51 Simon Horman wrote: > On Wed, Nov 27, 2013 at 02:18:26AM +0100, Laurent Pinchart wrote: > > This helps increasing build testing coverage. > > > > The driver doesn't compil

[PATCH 2/2] iommu/shmobile: Turn the flush_lock mutex into a spinlock

2013-12-17 Thread Laurent Pinchart
The lock is taken in atomic context, replace it with a spinlock. Signed-off-by: Laurent Pinchart --- drivers/iommu/shmobile-ipmmu.c | 10 +- drivers/iommu/shmobile-ipmmu.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/shmobile-ipmmu.c b/drivers

[PATCH 0/2] SH Mobile IOMMU fixes

2013-12-17 Thread Laurent Pinchart
Hello, These two small patches fix bugs in the SH Mobile IOMMU driver that result in crashes at runtime. Given that the bugs have been present in the driver since v3.9 there's no urgency to push the fixes to v3.13. Laurent Pinchart (2): iommu/shmobile: Allocate archdata with kzalloc()

[PATCH 1/2] iommu/shmobile: Allocate archdata with kzalloc()

2013-12-17 Thread Laurent Pinchart
The archdata attached_list field isn't initialized, leading to random crashes when accessed. Use kzalloc() to allocate the whole structure and make sure all fields get initialized properly. Signed-off-by: Laurent Pinchart --- drivers/iommu/shmobile-iommu.c | 3 +-- 1 file changed, 1 inse

Re: [PATCH 1/2] iommu/shmobile: Allocate archdata with kzalloc()

2013-12-18 Thread Laurent Pinchart
On Wednesday 18 December 2013 10:15:21 Simon Horman wrote: > On Tue, Dec 17, 2013 at 06:18:49PM +0100, Laurent Pinchart wrote: > > The archdata attached_list field isn't initialized, leading to random > > crashes when accessed. Use kzalloc() to allocate the whole structure a

Re: [PATCH 3/7] iommu/omap: Convert to devicetree

2014-01-01 Thread Laurent Pinchart
h, If CONFIG_OF isn't defined (pretty unlikely I agree, but a possibility you seem to be prepared for nonetheless given the above #if), this will fail to compile. > }, > }; -- Regards, Laurent Pinchart ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu: shmobile: depend on ARCH_SHMOBILE

2014-02-10 Thread Laurent Pinchart
seems ARCH_SHMOBILE was intended. Use > that. > > Signed-off-by: Paul Bolle Acked-by: Laurent Pinchart Joerg, could you please pick this patch up ? > --- > Completely untested. > > drivers/iommu/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCHv2 01/16] iommu/omap: convert to devm_* interfaces

2014-02-25 Thread Laurent Pinchart
Hi Suman, Thank you for the patch. On Thursday 13 February 2014 12:15:32 Suman Anna wrote: > Use the various devm_ interfaces to simplify the cleanup in > probe and remove functions. > > Signed-off-by: Florian Vaussard > Signed-off-by: Suman Anna Acked-by: Laurent Pinchart &

Re: [PATCHv2 02/16] iommu/omap: omap_iommu_attach() should return ENODEV, not NULL

2014-02-25 Thread Laurent Pinchart
tatic struct omap_iommu *omap_iommu_attach(const char > *name, u32 *iopgd) (void *)name, > device_match_by_alias); > if (!dev) > - return NULL; > + return ERR_PTR(err); I would return ERR_PTR(-ENODEV) here, and remove th

Re: [PATCHv2 07/16] iommu/omap: allow enable/disable even without pdata

2014-02-25 Thread Laurent Pinchart
s OMAP do not yet has a proper reset controller driver, > IOMMUs requiring a reset signal should use pdata-quirks as a > transitional solution. > > Signed-off-by: Florian Vaussard This looks good to me, but you should move this patch before 04/16, otherwise you'll break

Re: [PATCHv2 08/16] ARM: OMAP3: remove deprecated CONFIG_OMAP_IOMMU_IVA2

2014-02-25 Thread Laurent Pinchart
flag and > the corresponding hwmod data can be enabled. > > Cc: Paul Walmsley > Signed-off-by: Florian Vaussard > [s-a...@ti.com: revise commit log] > Signed-off-by: Suman Anna Acked-by: Laurent Pinchart > --- > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8

Re: [PATCHv2 03/16] Documentation: dt: add OMAP iommu bindings

2014-02-25 Thread Laurent Pinchart
+Example: > + /* OMAP3 ISP MMU */ > + mmu_isp: mmu@480bd400 { > + compatible = "ti,omap2-iommu"; > + reg = <0x480bd400 0x80>; > + interrupts = <24>; > + ti,hwmods = "mmu_isp"

Re: [PATCHv2 02/16] iommu/omap: omap_iommu_attach() should return ENODEV, not NULL

2014-02-25 Thread Laurent Pinchart
Hi Suman, On Tuesday 25 February 2014 16:32:03 Suman Anna wrote: > On 02/25/2014 03:13 PM, Laurent Pinchart wrote: > > On Thursday 13 February 2014 12:15:33 Suman Anna wrote: > >> From: Florian Vaussard > >> > >> omap_iommu_attach() returns N

Re: [PATCHv2 03/16] Documentation: dt: add OMAP iommu bindings

2014-02-25 Thread Laurent Pinchart
Hi Suman, On Tuesday 25 February 2014 17:02:35 Suman Anna wrote: > On 02/25/2014 03:26 PM, Laurent Pinchart wrote: > > On Thursday 13 February 2014 12:15:34 Suman Anna wrote: > >> From: Florian Vaussard > >> > >> This patch adds the iommu bindings for

Re: [PATCHv2 03/16] Documentation: dt: add OMAP iommu bindings

2014-02-26 Thread Laurent Pinchart
Hi Suman, On Wednesday 26 February 2014 11:02:24 Suman Anna wrote: > On 02/25/2014 08:13 PM, Laurent Pinchart wrote: > > On Tuesday 25 February 2014 17:02:35 Suman Anna wrote: > >> On 02/25/2014 03:26 PM, Laurent Pinchart wrote: > >>> On Thursday 13 February

Re: [PATCHv2 03/16] Documentation: dt: add OMAP iommu bindings

2014-02-26 Thread Laurent Pinchart
Hi Suman, On Wednesday 26 February 2014 14:23:03 Suman Anna wrote: > > On Wednesday 26 February 2014 11:02:24 Suman Anna wrote: > >> On 02/25/2014 08:13 PM, Laurent Pinchart wrote: > >>> On Tuesday 25 February 2014 17:02:35 Suman Anna wrote: > >>>> On 0

Re: [PATCH 3/4] ARM: dts: OMAP4: Add IOMMU nodes

2014-02-26 Thread Laurent Pinchart
-window = <0 0xd000>; I'm not too familiar with the M3 MPU in the OMAP4, but doesn't its memory map also include other reserved regions, such as 0x5504- 0x5505 to access the ISS ? > + ti,iommu-bus-err-back; > + }; > + > wdt2: wdt@4a314000

Re: [PATCHv2 03/16] Documentation: dt: add OMAP iommu bindings

2014-02-26 Thread Laurent Pinchart
Hi Suman, On Wednesday 26 February 2014 16:28:08 Suman Anna wrote: > On 02/26/2014 04:18 PM, Suman Anna wrote: > > On 02/26/2014 02:36 PM, Laurent Pinchart wrote: > >> On Wednesday 26 February 2014 14:23:03 Suman Anna wrote: > >>>> On Wednesday 26 Februa

[PATCH 0/2] Renesas VMSA-compatible IPMMU driver

2014-02-28 Thread Laurent Pinchart
the kernel. Although this makes the IPMMU unusable at the moment, it shouldn't block review of the driver as it shouldn't be involved in the problem. I'm of course investigating this. Laurent Pinchart (2): iommu: Add driver for Renesas VMSA-compatible IPMMU [TEST] ARM: shmobile: koels

[PATCH 1/2] iommu: Add driver for Renesas VMSA-compatible IPMMU

2014-02-28 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig| 12 + drivers/iommu/Makefile |1 + drivers/iommu/ipmmu-vmsa.c | 1070 ++ include/linux/platform_data/ipmmu-vmsa.h | 24 + 4 files changed, 1107

[PATCH 2/2] [TEST] ARM: shmobile: koelsch-reference: Instantiate IPMMU-MX

2014-02-28 Thread Laurent Pinchart
Not-Signed-off-by: Laurent Pinchart --- arch/arm/mach-shmobile/board-koelsch-reference.c | 30 1 file changed, 30 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index a3fd302..d2f4ed8

[PATCH 0/2] ARM SMMU fixes

2014-02-28 Thread Laurent Pinchart
Hello Will, I've studied your arm-smmu driver as a base to write a Renesas IOMMU driver and found two small issues. Here are patches to fix them. Please bear with me if my understanding was incorrect and the patches wrong :-) Laurent Pinchart (2): iommu/arm-smmu: Replace list walk

[PATCH 1/2] iommu/arm-smmu: Replace list walk with platform driver data

2014-02-28 Thread Laurent Pinchart
Instead of walking the list of registered SMMU devices at remove time to locate the device being removed, set platform driver data at probe time to point to the SMMU and retrieve the pointer at remove time. Signed-off-by: Laurent Pinchart --- drivers/iommu/arm-smmu.c | 15 --- 1

[PATCH 2/2] iommu/arm-smmu: Return 0 on unmap failure

2014-02-28 Thread Laurent Pinchart
The IOMMU core expects the unmap operation to return the number of bytes that have been unmapped or 0 on failure, a negative return value being treated like a number of bytes. Signed-off-by: Laurent Pinchart --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH 1/2] iommu: Add driver for Renesas VMSA-compatible IPMMU

2014-02-28 Thread Laurent Pinchart
; > +#endif /* __IPMMU_VMSA_H__ */ > > Also, what about the of-bindings? That's planned and will come in a second step. I was first trying to get the IPMMU working. -- Regards, Laurent Pinchart ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/2] iommu/arm-smmu: Replace list walk with platform driver data

2014-03-02 Thread Laurent Pinchart
Hi Will, On Friday 28 February 2014 16:38:37 Will Deacon wrote: > Hi Laurent, > > On Fri, Feb 28, 2014 at 03:37:09PM +, Laurent Pinchart wrote: > > Instead of walking the list of registered SMMU devices at remove time to > > locate the device being removed, set platform

Re: [PATCH 1/2] iommu: Add driver for Renesas VMSA-compatible IPMMU

2014-03-02 Thread Laurent Pinchart
Hi Geert, Thank you for the review. On Friday 28 February 2014 18:48:22 Geert Uytterhoeven wrote: > On Fri, Feb 28, 2014 at 4:24 PM, Laurent Pinchart wrote: > > +/* > > + * VMSA that states in section B3.6.3 "Control of Secure or Non-secure > > memory > > VMS

[PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-07 Thread Laurent Pinchart
The page table entries must be cleaned from the cache before being accessed by the IOMMU. Instead of implementing cache management manually (and ignoring L2 cache), use clean_dcache_area() to make sure the entries are visible to the device. Signed-off-by: Laurent Pinchart --- drivers/iommu/omap

[PATCH 4/5] iommu/omap: Remove comment about supporting single page mappings only

2014-03-07 Thread Laurent Pinchart
The IOMMU core breaks out mappings into pages already, there's no need to support mapping multiple pages in one go. Signed-off-by: Laurent Pinchart --- drivers/iommu/omap-iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c

[PATCH 2/5] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()

2014-03-07 Thread Laurent Pinchart
The flush_iotlb_page() function prints a debug message when no corresponding page was found in the TLB. That condition is incorrectly checked and always resolves to true, given that the for_each_iotlb_cr() loop is never interrupted and always reaches obj->nr_tlb_entries. Signed-off-by: Laur

[PATCH 3/5] iommu/omap: Flush the TLB only after updating translation table entries

2014-03-07 Thread Laurent Pinchart
after only. Signed-off-by: Laurent Pinchart --- drivers/iommu/omap-iommu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index cb1e1de..fedd303 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-io

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

2014-03-07 Thread Laurent Pinchart
uple 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

[PATCH 5/5] iommu/omap: Fix map protection value handling

2014-03-07 Thread Laurent Pinchart
parameters to little-endian, 8-bits and non-mixed page attributes. Furthermore, as the OMAP IOMMU doesn't support read-only or write-only mappings, ignore the prot value. Signed-off-by: Laurent Pinchart --- drivers/iommu/omap-iommu.c | 17 +++-- 1 file changed, 7 insertions(+

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

2014-03-12 Thread Laurent Pinchart
. 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 t

Re: [PATCH 5/5] iommu/omap: Fix map protection value handling

2014-03-14 Thread Laurent Pinchart
Hi Suman, Thank you for the review. On Thursday 13 March 2014 19:07:33 Suman Anna wrote: > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > The prot flags passed to the IOMMU map handler are defined in > > include/linux/iommu.h as IOMMU_(READ|WRITE|CACHE|EXEC). However, the >

Re: [PATCH 2/5] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()

2014-03-14 Thread Laurent Pinchart
Hi Suman, On Thursday 13 March 2014 17:16:07 Suman Anna wrote: > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > The flush_iotlb_page() function prints a debug message when no > > corresponding page was found in the TLB. That condition is incorrectly > > checked and al

Re: [PATCH 3/5] iommu/omap: Flush the TLB only after updating translation table entries

2014-03-14 Thread Laurent Pinchart
Hi Suman, On Thursday 13 March 2014 17:27:38 Suman Anna wrote: > Hi Laurent, > > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > Flushing the TLB before updating translation entries creates a race > > condition and can lead to stale TLB entries if a translation reques

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

2014-03-14 Thread Laurent Pinchart
Hi Suman, (CC'ing Joerg Roedel and Marek Szyprowski for the core IOMMU discussion) On Thursday 13 March 2014 21:33:37 Suman Anna wrote: > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > Hello, > > > > This patch set fixes miscellaneous issues with the OMAP IO

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Laurent Pinchart
Hi Santosh, On Friday 14 March 2014 12:15:11 Santosh Shilimkar wrote: > + Russell, Arnd > > On Thursday 13 March 2014 10:47 PM, Anna, Suman wrote: > > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > >> The page table entries must be cleaned from the cache before be

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

2014-03-17 Thread Laurent Pinchart
Hi Suman and Sakari, On Monday 17 March 2014 14:58:24 Suman Anna wrote: > On 03/16/2014 04:54 PM, Sakari Ailus wrote: > > On Fri, Mar 14, 2014 at 12:00:16PM +0100, Laurent Pinchart wrote: > >> Hi Suman, > >> > >> (CC'ing Joerg Roedel and Marek

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-17 Thread Laurent Pinchart
Hi all, On Friday 14 March 2014 20:49:56 Suman Anna wrote: > On 03/14/2014 12:51 PM, Santosh Shilimkar wrote: > > On Friday 14 March 2014 12:38 PM, Laurent Pinchart wrote: > >> On Friday 14 March 2014 12:15:11 Santosh Shilimkar wrote: > >>> On Thursday 13 March 20

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-17 Thread Laurent Pinchart
st the Renesas IOMMU doesn't need coherent memory as long as the driver makes sure that changes to the page tables are made visible to the device. That IOMMU can also use the DVM hardware coherency protocols on a cache coherent interconnect, but I haven't investigated that yet. -- Re

[PATCH v2] iommu: Add driver for Renesas VMSA-compatible IPMMU

2014-03-28 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig| 12 + drivers/iommu/Makefile |1 + drivers/iommu/ipmmu-vmsa.c | 1070 ++ include/linux/platform_data/ipmmu-vmsa.h | 24 + 4 files changed, 1107

[PATCH 3/5] iommu/ipmmu-vmsa: Add device tree support

2014-03-28 Thread Laurent Pinchart
Make platform data optional when the device is instantiated from DT and look up the micro-TLB number in the bus master DT node. Signed-off-by: Laurent Pinchart --- drivers/iommu/ipmmu-vmsa.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git

[PATCH 0/5] Renesas VMSA-compatible IPMMU DT support

2014-03-28 Thread Laurent Pinchart
iver in a round-robin way. A more configurable solution might be needed later, but I believe that's out of scope of DT. Cc: devicet...@vger.kernel.org Cc: Will Deacon Laurent Pinchart (5): iommu/ipmmu-vmsa: Refactor micro-TLB lookup iommu/ipmmu-vmsa: Add device tree bindings documen

[PATCH 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes

2014-03-28 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart --- arch/arm/boot/dts/r8a7791.dtsi | 49 ++ 1 file changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 2e22cb2..bbadf7a 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi

[PATCH 1/5] iommu/ipmmu-vmsa: Refactor micro-TLB lookup

2014-03-28 Thread Laurent Pinchart
Cache the micro-TLB number in archdata allocated in the .add_device handler instead of looking it up when the deviced is attached and detached. This simplifies the .attach_dev and .detach_dev operations and prepares for DT support. Signed-off-by: Laurent Pinchart --- drivers/iommu/ipmmu-vmsa.c

[PATCH 5/5] [TEST] ARM: shmobile: r8a7791: Enable IOMMU support for the VSP1

2014-03-28 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart --- arch/arm/boot/dts/r8a7791.dtsi | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index bbadf7a..26edcbe 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts

[PATCH 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation

2014-03-28 Thread Laurent Pinchart
Cc: devicet...@vger.kernel.org Cc: Will Deacon Signed-off-by: Laurent Pinchart --- .../bindings/iommu/renesas,ipmmu-vmsa.txt | 35 ++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt diff --git a

Re: [PATCH 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation

2014-03-31 Thread Laurent Pinchart
Hi Geert, On Monday 31 March 2014 10:39:48 Geert Uytterhoeven wrote: > On Sat, Mar 29, 2014 at 12:36 AM, Laurent Pinchart wrote: > > +Required Properties: > > + > > + - compatible: Must contain "renesas,ipmmu-vmsa". > > + - reg: Base address and size of the

Re: [PATCH 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes

2014-03-31 Thread Laurent Pinchart
Hi Geert, On Monday 31 March 2014 10:52:28 Geert Uytterhoeven wrote: > On Sat, Mar 29, 2014 at 12:36 AM, Laurent Pinchart wrote: > > + ipmmu_sy0: mmu@e6280800 { > > + compatible = "renesas,ipmmu-vmsa"; > > + reg = <0 0xe628080

Re: [PATCH 3/5] iommu/ipmmu-vmsa: Add device tree support

2014-03-31 Thread Laurent Pinchart
Hi Geert, On Monday 31 March 2014 10:45:00 Geert Uytterhoeven wrote: > On Sat, Mar 29, 2014 at 12:36 AM, Laurent Pinchart wrote: > > @@ -828,16 +829,31 @@ static phys_addr_t ipmmu_iova_to_phys(struct > > iommu_domain *io_domain,> > > static int ipmmu_find_utlb(struc

Re: [PATCH 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes

2014-04-01 Thread Laurent Pinchart
Hi Ben, On Monday 31 March 2014 15:30:00 Ben Dooks wrote: > On 31/03/14 15:01, Laurent Pinchart wrote: > > On Monday 31 March 2014 10:52:28 Geert Uytterhoeven wrote: > >> On Sat, Mar 29, 2014 at 12:36 AM, Laurent Pinchart wrote: > >>> +

Re: [PATCH 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation

2014-04-01 Thread Laurent Pinchart
Hi Sergei, Thank you for the review. On Saturday 29 March 2014 18:50:16 Sergei Shtylyov wrote: > On 03/29/2014 02:36 AM, Laurent Pinchart wrote: > > Cc: devicet...@vger.kernel.org > > Cc: Will Deacon > > Signed-off-by: Laurent Pinchart > > > > --- > >

[PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU

2014-04-02 Thread Laurent Pinchart
Signed-off-by: Laurent Pinchart --- drivers/iommu/Kconfig| 12 + drivers/iommu/Makefile |1 + drivers/iommu/ipmmu-vmsa.c | 1070 ++ include/linux/platform_data/ipmmu-vmsa.h | 24 + 4 files changed, 1107

[PATCH 0/3] SH-Mobile IPMMU miscellaneous cleanups

2014-04-02 Thread Laurent Pinchart
Hello, These three patches are small cleanups for the SH-Mobile IPMMU driver. Nothing special here, please see individual patches for details. I plan to send a pull request in a couple of days. Laurent Pinchart (2): iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value

[PATCH 3/3] iommu/shmobile: Use devm_ioremap_resource()

2014-04-02 Thread Laurent Pinchart
Replace the devm_ioremap_nocache() call with devm_ioremap_resource(). This simplifies error checking. Signed-off-by: Laurent Pinchart --- drivers/iommu/shmobile-ipmmu.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/shmobile-ipmmu.c b

[PATCH 1/3] iommu/shmobile: Depend on ARCH_SHMOBILE

2014-04-02 Thread Laurent Pinchart
From: Paul Bolle Commit 78a2e12f51d9 ("iommu: shmobile: Enable driver compilation with COMPILE_TEST") added an optional dependency on SH_MOBILE. But that Kconfig symbol doesn't exist. It seems ARCH_SHMOBILE was intended. Use that. Signed-off-by: Paul Bolle Signed-off-by: L

[PATCH 2/3] iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value

2014-04-02 Thread Laurent Pinchart
The function can fail, don't ignore its error value. Signed-off-by: Laurent Pinchart --- drivers/iommu/shmobile-ipmmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/shmobile-ipmmu.c b/drivers/iommu/shmobile-ipmmu.c index e3bc2e1..6ba6110 100644

Re: [PATCH 0/2] ARM SMMU fixes

2014-04-02 Thread Laurent Pinchart
Hi Will, On Friday 28 February 2014 16:37:08 Laurent Pinchart wrote: > Hello Will, > > I've studied your arm-smmu driver as a base to write a Renesas IOMMU driver > and found two small issues. Here are patches to fix them. Please bear with > me if my understanding was incor

[PATCH v2 0/6] OMAP IOMMU fixes

2014-04-03 Thread Laurent Pinchart
I" and "iommu/omap: Flush the TLB only after updating translation table entries" patches - Reworked "iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()" to just break out of the loop - Added patches 1/6 to 3/6 Laurent Pinchart (3): iommu/omap: F

[PATCH v2 3/6] iommu/omap: Move to_iommu definition from omap-iopgtable.h

2014-04-03 Thread Laurent Pinchart
From: Suman Anna The to_iommu definition is used only locally to the omap-iommu.c source file, and it has nothing to do with the page attributes defined in omap-iopgtable.h. So, move the definition out of omap-iopgtable.h header file. Signed-off-by: Suman Anna --- drivers/iommu/omap-iommu.c

[PATCH v2 4/6] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()

2014-04-03 Thread Laurent Pinchart
7;t have two TLB entries for the same VA, break from the loop when a match is found. Signed-off-by: Laurent Pinchart --- drivers/iommu/omap-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index fdf3dd0..428b47a 100644 --- a/drive

  1   2   3   4   5   >