Re: [PATCH v3 1/8] iommu: Add MMIO mapping type

2016-02-16 Thread Niklas Söderlund
Hi Robin, Thanks for your update patch I will include it in my next version. But I'm sorry I do not understand, is your modification an addition or a substitution to your original patch? * Robin Murphy [2016-02-11 15:57:26 +]: > On 11/02/16 00:02, Laurent Pinchart

Re: [PATCH v3 1/8] iommu: Add MMIO mapping type

2016-02-16 Thread Robin Murphy
On 16/02/16 12:06, Niklas Söderlund wrote: Hi Robin, Thanks for your update patch I will include it in my next version. But I'm sorry I do not understand, is your modification an addition or a substitution to your original patch? Apologies for being confusing - that was a diff on top of the

Re: [PATCH v3 1/8] iommu: Add MMIO mapping type

2016-02-16 Thread Niklas Söderlund
* Robin Murphy [2016-02-16 12:43:40 +]: > On 16/02/16 12:06, Niklas Söderlund wrote: > >Hi Robin, > > > >Thanks for your update patch I will include it in my next version. But > >I'm sorry I do not understand, is your modification an addition or a > >substitution to

[PATCH 2/2] iommu: fix default domain handling in __iommu_detach_group()

2016-02-16 Thread Marek Szyprowski
This patch ensures that all devices will be first detached from the provided domain and then attached to the default_domain if such has been provided. Signed-off-by: Marek Szyprowski --- drivers/iommu/iommu.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 1/2] iommu: call detach also for default_domain before attaching to new one

2016-02-16 Thread Marek Szyprowski
This patch ensures that devices attached to the default_domain will be first detached from it before attaching to new domain. To avoid forward declaration, __iommu_attach_group() function has been moved to new place in the source code. Signed-off-by: Marek Szyprowski

[PATCH 0/2] iommu: fix handling of attach/detach for default domains

2016-02-16 Thread Marek Szyprowski
Hello, This patchset fixes attaching and detaching devices to a group, which has default domain configured. With both patches applied all calls to iommu's attach/detach functions will be balanced, whenever caller attaches device to the default domain or the custom one. Best regards Marek

[PATCH 00/11] SYSMMU driver update and support for Exynos 5433

2016-02-16 Thread Marek Szyprowski
Hello, This patchset updates Exynos SYSMMU (IOMMU) driver to make use of the new features in the IOMMU core (support for IOMMU_DOMAIN_DMA) and adds support for SYSMMU v5 controllers, which are available in Samsung Exynos 5433 SoCs. The driver has been also updated to compile and work on ARM64

[PATCH 03/11] iommu: exynos: remove ARM-specific cache flush interface

2016-02-16 Thread Marek Szyprowski
This patch replaces custom ARM-specific code for performing CPU cache flush operations with generic code based on DMA-mapping. Domain managing code is independent of particular SYSMMU device, so the first registered SYSMMU device is used for DMA-mapping calls. This simplification works fine

[PATCH 08/11] iommu: exynos: unify code for fldp cache invalidation

2016-02-16 Thread Marek Szyprowski
This patch simplifies the code for handling of flpdcache invalidation. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c

[PATCH 04/11] iommu: exynos: simplify master clock operations

2016-02-16 Thread Marek Szyprowski
All clock API function can be called on NULL clock, so simplify code avoid checking of master clock presence. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff

[PATCH 09/11] iommu: exynos: update device tree documentation

2016-02-16 Thread Marek Szyprowski
Exynos SYSMMU bindings documentation was merged before generic IOMMU binding have been introduced. This patch updates documentation to match current state. Signed-off-by: Marek Szyprowski --- .../devicetree/bindings/iommu/samsung,sysmmu.txt | 19

[PATCH 11/11] iommu: exynos: add Maintainers entry for Exynos SYSMMU driver

2016-02-16 Thread Marek Szyprowski
Add Marek Szyprowski as maintainer for Exynos IOMMU driver. Signed-off-by: Marek Szyprowski --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7bd927e..1e9c4df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4336,6

[PATCH 07/11] iommu: exynos: refactor init config code

2016-02-16 Thread Marek Szyprowski
This patch rewrites sysmmu_init_config function to make it easier to read and understand. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git

[PATCH 02/11] iommu: exynos: add support for IOMMU_DOMAIN_DMA domain type

2016-02-16 Thread Marek Szyprowski
This patch adds support for DMA domain type. Such domain have DMA cookie prepared and can be used by generic DMA-IOMMU glue layer. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 19 +++ 1 file changed, 15 insertions(+), 4

[PATCH 05/11] iommu: exynos: refactor code (no direct register access)

2016-02-16 Thread Marek Szyprowski
This patch changes some internal functions to have access to the state of sysmmu device instead of having only it's registers. This will make the code ready for future extensions. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 40

[PATCH 01/11] iommu: exynos: rework iommu group initialization

2016-02-16 Thread Marek Szyprowski
This patch replaces custom code in add_device implementation with iommu_group_get_for_dev() call and provides the needed callback. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 27 --- 1 file changed, 16 insertions(+), 11

[PATCH 10/11] iommu: exynos: add support for v5 SYSMMU

2016-02-16 Thread Marek Szyprowski
This patch adds support for v5 of SYSMMU controller, found in Samsung Exynos 5433 SoCs. The main difference of v5 is support for 36-bit physical address space and some changes in register layout and core clocks hanging. This patch also adds support for ARM64 architecture, which is used by Exynos

[PATCH 06/11] iommu: exynos: refactor fault handling code

2016-02-16 Thread Marek Szyprowski
This patch provides a new implementation for page fault handing code. The new implementation is ready for future extensions. No functional changes have been made. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 109

Re: [PATCH v8 3/5] memory: mediatek: Add SMI driver

2016-02-16 Thread Robin Murphy
Hi Joerg, On 16/02/16 14:11, Joerg Roedel wrote: On Sun, Jan 31, 2016 at 12:00:41PM +0100, Matthias Brugger wrote: On 26/01/16 05:12, Yong Wu wrote: This patch add SMI(Smart Multimedia Interface) driver. This driver is responsible to enable/disable iommu and control the power domain and

Re: [PATCH 1/2] iommu: call detach also for default_domain before attaching to new one

2016-02-16 Thread Joerg Roedel
On Tue, Feb 16, 2016 at 03:40:31PM +0100, Marek Szyprowski wrote: > This patch ensures that devices attached to the default_domain will be > first detached from it before attaching to new domain. To avoid forward > declaration, __iommu_attach_group() function has been moved to new place > in the

Re: [PATCH v8 3/5] memory: mediatek: Add SMI driver

2016-02-16 Thread Joerg Roedel
On Tue, Feb 16, 2016 at 03:32:11PM +, Robin Murphy wrote: > Hi Joerg, > > On 16/02/16 14:11, Joerg Roedel wrote: > >On Sun, Jan 31, 2016 at 12:00:41PM +0100, Matthias Brugger wrote: > >> > >> > >>On 26/01/16 05:12, Yong Wu wrote: > >>>This patch add SMI(Smart Multimedia Interface) driver.

Re: [PATCH v8 3/5] memory: mediatek: Add SMI driver

2016-02-16 Thread Will Deacon
On Tue, Feb 16, 2016 at 05:10:09PM +0100, Joerg Roedel wrote: > On Tue, Feb 16, 2016 at 03:32:11PM +, Robin Murphy wrote: > > On 16/02/16 14:11, Joerg Roedel wrote: > > >On Sun, Jan 31, 2016 at 12:00:41PM +0100, Matthias Brugger wrote: > > >>On 26/01/16 05:12, Yong Wu wrote: > > >>>This patch

Re: Can't boot new 4.4 kernel with IOMMU enabled

2016-02-16 Thread Joerg Roedel
On Tue, Feb 02, 2016 at 10:49:11AM -0500, Mark Hounschell wrote: > Just wondering if this issue is still being considered? Yes it is, I just went through a move and have a few other issues on the plate. But I this is still on the list. Joerg

Re: [PATCH v8 3/5] memory: mediatek: Add SMI driver

2016-02-16 Thread Joerg Roedel
On Tue, Feb 16, 2016 at 04:20:00PM +, Will Deacon wrote: > I'm more than happy to bake a branch containing all the page table stuff, > but Yong's stuff depends on it so I'll work with whatever is easiest for > you. Okay, to the best is if you would collect all the page table patches and send

Re: [PATCH v8 3/5] memory: mediatek: Add SMI driver

2016-02-16 Thread Will Deacon
On Tue, Feb 16, 2016 at 05:26:41PM +0100, Joerg Roedel wrote: > On Tue, Feb 16, 2016 at 04:20:00PM +, Will Deacon wrote: > > I'm more than happy to bake a branch containing all the page table stuff, > > but Yong's stuff depends on it so I'll work with whatever is easiest for > > you. > >

Re: DMAR error messages after 'shutdown -r'.

2016-02-16 Thread Joerg Roedel
On Tue, Feb 09, 2016 at 02:59:00PM -0500, Valdis Kletnieks wrote: > [0.027629] Freeing SMP alternatives memory: 28K (8e111000 - > 8e118000) > [0.048199] ftrace: allocating 31090 entries in 122 pages > [0.061837] DMAR: Host address width 36 > [0.061841] DMAR: DRHD

Re: Can't boot new 4.4 kernel with IOMMU enabled

2016-02-16 Thread Mark Hounschell
On 02/16/2016 11:24 AM, Joerg Roedel wrote: On Tue, Feb 02, 2016 at 10:49:11AM -0500, Mark Hounschell wrote: Just wondering if this issue is still being considered? Yes it is, I just went through a move and have a few other issues on the plate. But I this is still on the list. Thanks,

[PATCH v4 7/8] ARM: dts: r8a7790: add iommus to dmac0 and dmac1

2016-02-16 Thread Niklas Söderlund
A unconfirmed hardware bug prevents channel 0 and 15 to be used by the DMAC together with the IPMMU. The DMAC driver will disable the channels reducing the effective number of channels to 14 per DMAC. Signed-off-by: Niklas Söderlund Acked-by: Laurent

[PATCH v4 6/8] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-02-16 Thread Niklas Söderlund
Enable slave transfers to devices behind IPMMU:s by mapping the slave addresses using the dma-mapping API. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- drivers/dma/sh/rcar-dmac.c | 52

[PATCH v4 5/8] dmaengine: rcar-dmac: group slave configuration

2016-02-16 Thread Niklas Söderlund
Group slave address and transfer size in own structs for source and destination. This is in preparation for hooking up the dma-mapping API to the slave addresses. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart

[PATCH v4 4/8] arm: dma-mapping: add {map, unmap}_resource for iommu ops

2016-02-16 Thread Niklas Söderlund
Add methods to map/unmap device resources addresses for dma_map_ops that are IOMMU aware. This is needed to map a device MMIO register from a physical address. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart

[PATCH v4 3/8] dma-mapping: add dma_{map,unmap}_resource

2016-02-16 Thread Niklas Söderlund
Map/Unmap a device resource from a physical address. If no dma_map_ops method is available the operation is a no-op. Signed-off-by: Niklas Söderlund --- include/linux/dma-mapping.h | 32 1 file changed, 32 insertions(+)

[PATCH v4 2/8] dma-mapping: add {map,unmap}_resource to dma_map_ops

2016-02-16 Thread Niklas Söderlund
Add methods to handle mapping of device resources from a physical address. This is needed for example to be able to map MMIO FIFO registers to a IOMMU. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart ---

[PATCH v4 0/8] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-02-16 Thread Niklas Söderlund
Hi, This series add iommu support to rcar-dmac. It's tested on Koelsch with CONFIG_IPMMU_VMSA and by enabling the ipmmu_ds node in r8a7791.dtsi. I verified operation by interacting with /dev/mmcblk1 which is a device behind the iommu. The series depends on out of tree patch '[PATCH] dmaengine:

Re: [RFC PATCH 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS

2016-02-16 Thread Jayachandran Chandrashekaran Nair
On Tue, Feb 16, 2016 at 1:09 AM, Alex Williamson wrote: > On Mon, 15 Feb 2016 12:20:23 -0600 > Bjorn Helgaas wrote: > >> [+cc Alex, iommu list] >> >> On Mon, Feb 15, 2016 at 03:35:00AM +0530, Jayachandran C wrote: >> > Add a new flag

Re: [RFC PATCH 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_BRIDGE_SKIP_ALIAS

2016-02-16 Thread Alex Williamson
On Wed, 17 Feb 2016 02:38:24 +0530 Jayachandran Chandrashekaran Nair wrote: > On Tue, Feb 16, 2016 at 1:09 AM, Alex Williamson > wrote: > > On Mon, 15 Feb 2016 12:20:23 -0600 > > Bjorn Helgaas wrote: > >

Re: [PATCH 11/11] iommu: exynos: add Maintainers entry for Exynos SYSMMU driver

2016-02-16 Thread Krzysztof Kozlowski
On 16.02.2016 23:57, Marek Szyprowski wrote: > Add Marek Szyprowski as maintainer for Exynos IOMMU driver. > > Signed-off-by: Marek Szyprowski > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+) > Acked-by: Krzysztof Kozlowski

Re: [PATCH 1/2] iommu: call detach also for default_domain before attaching to new one

2016-02-16 Thread Marek Szyprowski
Hello, On 2016-02-16 16:59, Joerg Roedel wrote: On Tue, Feb 16, 2016 at 03:40:31PM +0100, Marek Szyprowski wrote: This patch ensures that devices attached to the default_domain will be first detached from it before attaching to new domain. To avoid forward declaration, __iommu_attach_group()