[PATCH v2 03/18] drm: exynos: detach from default dma-mapping domain on init

2014-09-16 Thread Marek Szyprowski
This patch adds code, which detach sub-device nodes from default iommu domain if such has been configured. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers

[PATCH v2 04/18] clk: exynos: add missing smmu_g2d clock and update comments

2014-09-16 Thread Marek Szyprowski
This patch adds missing smmu_g2d clock implementation and updates comment about Exynos4 clocks from 278-282 range. Those clocks are available on all Exynos4 SoC series, so the misleading comment has been removed. Signed-off-by: Marek Szyprowski Acked-by: Tomasz Figa --- drivers/clk/samsung/clk

[PATCH v2 00/18] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2014-09-16 Thread Marek Szyprowski
discussed separately after the basic support gets merged 3. removed support for power domain notifier-based runtime power management - this also will be discussed separately later I hope that the driver with above changes will be easier to be merged to v3.18. Best regards Marek Szyprowski Samsung

[PATCH v2 01/18] arm: dma-mapping: arm_iommu_attach_device: automatically set max_seg_size

2014-09-16 Thread Marek Szyprowski
If device has no max_seg_size set, we assume that there is no limit and force it to DMA_BIT_MASK(32) to always use contiguous mappings in DMA address space. Signed-off-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 16 1 file changed, 16 insertions(+) diff --git a/arch

[PATCH v2 02/18] arm: exynos: bind power domains earlier, on device creation

2014-09-16 Thread Marek Szyprowski
This patches change initialization time of power domain driver from client device driver bind to device creation. This lets other core drivers to register power domain notifiers before client driver is bound. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/pm_domains.c | 12

[PATCH v2 05/18] ARM: DTS: Exynos4: add System MMU nodes

2014-09-16 Thread Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi| 117 ++ arch/arm/boot/dts/exynos4210.dtsi | 23 arch/arm/boot/dts/exynos4x12.dtsi | 82

[PATCH v2 07/18] iommu: exynos: remove unused functions

2014-09-16 Thread Marek Szyprowski
This patch removes two unneeded functions, which are not a part of generic IOMMU API and were never used by any other driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/iommu/exynos

[PATCH v2 10/18] iommu: exynos: remove unused functions, part 2

2014-09-16 Thread Marek Szyprowski
After refactoring functions to use pointer to struct sysmmu_drvdata directly, some functions became useless and thus never used, so remove them completely. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 43 --- 1 file changed, 43

[PATCH v2 08/18] iommu: exynos: remove useless spinlock

2014-09-16 Thread Marek Szyprowski
This patch removes useless spinlocks and other unused members from struct exynos_iommu_owner. There is no point is protecting this structure by spinlock because content of this structure doesn't change and other structures have their own spinlocks. Signed-off-by: Marek Szyprowski --- dr

[PATCH v2 13/18] iommu: exynos: add support for runtime_pm

2014-09-16 Thread Marek Szyprowski
This patch fixes support for runtime power management for SYSMMU controllers, so they are enabled when master device is attached. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu

[PATCH v2 12/18] iommu: exynos: add support for binding more than one sysmmu to master device

2014-09-16 Thread Marek Szyprowski
: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 1b3f00726cd4..cf36cdecf335 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos

[PATCH v2 11/18] iommu: exynos: remove useless device_add/remove callbacks

2014-09-16 Thread Marek Szyprowski
The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c

[PATCH v2 17/18] iommu: exynos: init from dt-specific callback instead of initcall

2014-09-16 Thread Marek Szyprowski
This patch introduces IOMMU_OF_DECLARE-based initialization to the driver, which replaces subsys_initcall-based procedure. exynos_iommu_of_setup ensures that each sysmmu controller is probed before its master device. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 32

[PATCH v2 09/18] iommu: exynos: refactor function parameters to simplify code

2014-09-16 Thread Marek Szyprowski
This patch simplifies the code by: - refactoring function parameters from struct device pointer to direct pointer to struct sysmmu drvdata - moving list_head enteries from struct exynos_iommu_owner directly to struct sysmmu_drvdata Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos

[PATCH v2 16/18] iommu: exynos: remove excessive includes and sort others alphabetically

2014-09-16 Thread Marek Szyprowski
Removed following unused includes: , , and . Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index a75b06365f97..5eb999d7653a 100644

[PATCH v2 18/18] iommu: exynos: add callback for initializing devices from device tree

2014-09-16 Thread Marek Szyprowski
This patch adds implementation of of_xlate callback, which prepares masters device for attaching to IOMMU. This callback is called during creating devices from device tree. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28 1 file changed, 28

[PATCH v2 14/18] iommu: exynos: rename variables to reflect their purpose

2014-09-16 Thread Marek Szyprowski
This patch renames some variables to make the code easier to understand. 'domain' is replaced by 'iommu_domain' (more generic entity) and really meaning less 'priv' by 'domain' to reflect its purpose. Signed-off-by: Marek Szyprowski

[PATCH v2 15/18] iommu: exynos: document internal structures

2014-09-16 Thread Marek Szyprowski
Add a few words of comment to all internal structures used by the driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 49 +--- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers

Re: [PATCH v2 01/18] arm: dma-mapping: arm_iommu_attach_device: automatically set max_seg_size

2014-09-25 Thread Marek Szyprowski
Hello, On 2014-09-24 19:06, Will Deacon wrote: Hi Marek, On Tue, Sep 16, 2014 at 12:54:28PM +0100, Marek Szyprowski wrote: If device has no max_seg_size set, we assume that there is no limit and force it to DMA_BIT_MASK(32) to always use contiguous mappings in DMA address space. Signed-off

Re: [PATCH v2] cma: make default CMA area size zero for x86

2014-10-06 Thread Marek Szyprowski
bbert Cc: Jean Delvare Cc: Marek Szyprowski Cc: Konrad Rzeszutek Wilk Cc: David Woodhouse Cc: Don Dutile Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Yinghai Lu Cc: x...@kernel.org Cc: iommu@lists.linux-foundation.org Acked-by: Marek Szyprowski

Re: [PATCH] arm: dma-mapping: fix compilation error when CONFIG_MMU is not present

2014-10-23 Thread Marek Szyprowski
abled by COMPILE_TEST option (here the issue is caused by SHMOBILE_IOMMU, which otherwise cannot be enabled when no-mmu systems are selected). Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ iommu mailing list iommu@lists.lin

[PATCH] iommu: exynos: make driver multiarch friendly

2014-10-24 Thread Marek Szyprowski
Initialize all structures and register to iommu subsystem only on Exynos compatible platforms. Signed-off-by: Marek Szyprowski Acked-by: Arnd Bergmann --- drivers/iommu/exynos-iommu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos

Re: [RFC PATCH v3 5/7] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-10-27 Thread Marek Szyprowski
p the limited support I'd cooked up from this patch set in the next version. Great! That's more or less something I've already implemented on top of your previous patchset, as I didn't have any good idea how to manage multiple masters separately. I'm waiting for your next u

Re: [PATCH] arm: dma-mapping: fix compilation error when CONFIG_MMU is not present

2014-10-27 Thread Marek Szyprowski
ed is the right approach. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [RFC PATCH v4 1/8] iommu: provide early initialisation hook for IOMMU drivers

2014-11-18 Thread Marek Szyprowski
return np->data; +} + +extern struct of_device_id __iommu_of_table; + +typedef int (*of_iommu_init_fn)(struct device_node *); + +#define IOMMU_OF_DECLARE(name, compat, fn) \ + _OF_DECLARE(iommu, name, compat, fn, of_iommu_init_fn) + #endif /* __OF_IOMMU_H */ Best regards -- Marek

[PATCH v3 03/19] arm: dma-mapping: add missing check for iommu

2014-11-19 Thread Marek Szyprowski
There is no point trying to initialize dma_ops with arm_get_iommu_dma_map_ops() if no iommu has been provided. Signed-off-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c

[PATCH v3 11/19] iommu: exynos: remove unused functions, part 2

2014-11-19 Thread Marek Szyprowski
After refactoring functions to use pointer to struct sysmmu_drvdata directly, some functions became useless and thus never used, so remove them completely. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 43 --- 1 file changed, 43

[PATCH v3 12/19] iommu: exynos: remove useless device_add/remove callbacks

2014-11-19 Thread Marek Szyprowski
The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c

[PATCH v3 09/19] iommu: exynos: remove useless spinlock

2014-11-19 Thread Marek Szyprowski
This patch removes useless spinlocks and other unused members from struct exynos_iommu_owner. There is no point is protecting this structure by spinlock because content of this structure doesn't change and other structures have their own spinlocks. Signed-off-by: Marek Szyprowski --- dr

[PATCH v3 04/19] drm: exynos: detach from default dma-mapping domain on init

2014-11-19 Thread Marek Szyprowski
This patch adds code, which detach sub-device nodes from default iommu domain if such has been configured. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers

[PATCH v3 05/19] arm: exynos: pm_domains: add support for devices registered before arch_initcall

2014-11-19 Thread Marek Szyprowski
SYSMMU devices will be registered early before any other devices and before calling arch_initcall. To add them to respective power domains, additional scan of all platform devices is needed. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/pm_domains.c | 9 - 1 file changed, 8

[PATCH v3 06/19] ARM: dts: exynos4: add sysmmu nodes

2014-11-19 Thread Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi| 117 ++ arch/arm/boot/dts/exynos4210.dtsi | 23 arch/arm/boot/dts/exynos4x12.dtsi | 82

[PATCH v3 08/19] iommu: exynos: remove unused functions

2014-11-19 Thread Marek Szyprowski
This patch removes two unneeded functions, which are not a part of generic IOMMU API and were never used by any other driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/iommu/exynos

[PATCH v3 07/19] iommu: exynos: don't read version register on every tlb operation

2014-11-19 Thread Marek Szyprowski
This patch removes reading of REG_MMU_VERSION register on every tlb operation and caches SYSMMU version in driver's internal data. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/

[PATCH v3 01/19] iommu: fix const qualifier in of_iommu_set_ops

2014-11-19 Thread Marek Szyprowski
Make of_iommu_set_ops() parameter attribute consistent with bus_set_iommu(). Signed-off-by: Marek Szyprowski --- include/linux/of_iommu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h index 7ded21c0ccdf..d03abbb11c34

[PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2014-11-19 Thread Marek Szyprowski
hat Will's proposal works fine and significantly simplifies the driver code. Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v3: - rebased onto "[RFC PATCH v4 0/8] Introduce automatic DMA configuration for IOMMU masters" - added some minor fixes for iom

[PATCH v3 02/19] iommu: fix initialization without 'add_device' callback

2014-11-19 Thread Marek Szyprowski
IOMMU drivers can be initialized from of_iommu helpers. Such drivers don't need to provide device_add callbacks to operate properly, so there is no need to fail initialization if the callback is missing. Signed-off-by: Marek Szyprowski --- drivers/iommu/iommu.c | 2 +- 1 file chang

[PATCH v3 14/19] iommu: exynos: add support for runtime_pm

2014-11-19 Thread Marek Szyprowski
This patch fixes support for runtime power management for SYSMMU controllers, so they are enabled when master device is attached. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu

[PATCH v3 10/19] iommu: exynos: refactor function parameters to simplify code

2014-11-19 Thread Marek Szyprowski
This patch simplifies the code by: - refactoring function parameters from struct device pointer to direct pointer to struct sysmmu drvdata - moving list_head enteries from struct exynos_iommu_owner directly to struct sysmmu_drvdata Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos

[PATCH v3 17/19] iommu: exynos: remove excessive includes and sort others alphabetically

2014-11-19 Thread Marek Szyprowski
Removed following unused includes: , , and . Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index a5b32cdeec2d..cd28dc09db39 100644

[PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-11-19 Thread Marek Szyprowski
This patch introduces IOMMU_OF_DECLARE-based initialization to the driver, which replaces subsys_initcall-based procedure. exynos_iommu_of_setup ensures that each sysmmu controller is probed before its master device. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28

[PATCH v3 16/19] iommu: exynos: document internal structures

2014-11-19 Thread Marek Szyprowski
Add a few words of comment to all internal structures used by the driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 49 +--- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers

[PATCH v3 15/19] iommu: exynos: rename variables to reflect their purpose

2014-11-19 Thread Marek Szyprowski
This patch renames some variables to make the code easier to understand. 'domain' is replaced by 'iommu_domain' (more generic entity) and really meaning less 'priv' by 'domain' to reflect its purpose. Signed-off-by: Marek Szyprowski

[PATCH v3 19/19] iommu: exynos: add callback for initializing devices from device tree

2014-11-19 Thread Marek Szyprowski
This patch adds implementation of of_xlate callback, which prepares masters device for attaching to IOMMU. This callback is called during creating devices from device tree. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28 1 file changed, 28

Re: [RFC PATCH v4 0/8] Introduce automatic DMA configuration for IOMMU masters

2014-11-19 Thread Marek Szyprowski
s patchset and it works fine, You can find them in the "[PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem" thread. You can add to all your patches: Acked-by: Marek Szyprowski I'm also interested in adding get_default_domain() callback, but I

[PATCH v3 13/19] iommu: exynos: add support for binding more than one sysmmu to master device

2014-11-19 Thread Marek Szyprowski
: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 93b97df772f1..77dec32c59ef 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos

Re: [RFC PATCH v4 0/8] Introduce automatic DMA configuration for IOMMU masters

2014-11-24 Thread Marek Szyprowski
Hello, On 2014-11-19 12:41, Will Deacon wrote: Hi Marek, On Wed, Nov 19, 2014 at 11:21:26AM +, Marek Szyprowski wrote: On 2014-11-14 19:56, Will Deacon wrote: Hello everybody, Here is the fourth iteration of the RFC I've previously posted here: RFCv1: http://lists.infradea

Re: [PATCH v6 1/8] iommu: provide early initialisation hook for IOMMU drivers

2014-12-02 Thread Marek Szyprowski
ed-by: Arnd Bergmann Acked-by: Joerg Roedel Acked-by: Marek Szyprowski Tested-by: Robin Murphy Signed-off-by: Will Deacon --- drivers/iommu/of_iommu.c | 17 + include/asm-generic/vmlinux.lds.h | 2 ++ include/linux/iommu.h | 2 ++ include/linux/of_io

Re: [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2014-12-05 Thread Marek Szyprowski
Hello, On 2014-12-02 10:59, Sjoerd Simons wrote: Hey Marek, Inki, On Wed, 2014-11-19 at 12:15 +0100, Marek Szyprowski wrote: Hello Everyone, This is another attempt to finally make Exynos SYSMMU driver fully integrated with DMA-mapping subsystem. The main change from previous version is a

Re: [PATCH v6 1/8] iommu: provide early initialisation hook for IOMMU drivers

2014-12-05 Thread Marek Szyprowski
re we are in the release cycle. If that's not the case, why even bother getting this hack into 3.19 if nobody uses it and we're going to change it in 3.20 anyway? There are Exynos SYSMMU patches ready & waiting for this gets merged... Best regards -- Marek Szyprowski, PhD Samsung

Re: [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-16 Thread Marek Szyprowski
enabled by bootloader. However please not that I would really like to have something merged. The discussion about iommu controllers lasts for about 2 years and we still don't have ANYTHING working in mainline, so lets merge the of_iommu glue and then check how the remaining issues can be solved.

Re: [PATCH RESEND] dma-mapping: tidy up dma_parms default handling

2015-01-13 Thread Marek Szyprowski
ot;default", as might be expected. In the process, clean up a bit by replacing the bare constants with slightly more meaningful macros and removing the superfluous "else" statements. Signed-off-by: Robin Murphy Acked-by: Marek Szyprowski --- Hi, various maintainers from Git

[PATCH v4 03/18] ARM: dts: exynos4: add sysmmu nodes

2015-01-16 Thread Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi| 118 ++ arch/arm/boot/dts/exynos4210.dtsi | 23 arch/arm/boot/dts/exynos4x12.dtsi | 82

[PATCH v4 01/18] drm: exynos: detach from default dma-mapping domain on init

2015-01-16 Thread Marek Szyprowski
This patch adds code, which detach sub-device nodes from default iommu domain if such has been configured. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers

[PATCH v4 00/18] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2015-01-16 Thread Marek Szyprowski
ists/arm-kernel/msg391148.html) Kukjin, could you merge those patches? 3. Exynos DRM fix. This patch in my opinion should go Exynos DRM tree. Inki, could you merge it? Best regards Marek Szyprowski Samsung R&D Institute Poland Changelog: v4: - rebased onto v3.19-rc4 and other Exynos DTS qu

[PATCH v4 04/18] ARM: dts: exynos5250: add sysmmu nodes

2015-01-16 Thread Marek Szyprowski
Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos5250.dtsi | 250 ++ 1 file changed, 250 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index cf4a6ec62f71..30d29ff502a7 100644 --- a/arch/arm/boot

[PATCH v4 09/18] iommu: exynos: refactor function parameters to simplify code

2015-01-16 Thread Marek Szyprowski
This patch simplifies the code by: - refactoring function parameters from struct device pointer to direct pointer to struct sysmmu drvdata - moving list_head enteries from struct exynos_iommu_owner directly to struct sysmmu_drvdata Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos

[PATCH v4 10/18] iommu: exynos: remove unused functions, part 2

2015-01-16 Thread Marek Szyprowski
After refactoring functions to use pointer to struct sysmmu_drvdata directly, some functions became useless and thus never used, so remove them completely. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 43 --- 1 file changed, 43

[PATCH v4 02/18] arm: exynos: pm_domains: add support for devices registered before arch_initcall

2015-01-16 Thread Marek Szyprowski
SYSMMU devices will be registered early before any other devices and before calling arch_initcall. To add them to respective power domains, additional scan of all platform devices is needed. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/pm_domains.c | 9 - 1 file changed, 8

[PATCH v4 16/18] iommu: exynos: remove excessive includes and sort others alphabetically

2015-01-16 Thread Marek Szyprowski
Removed following unused includes: , , and . Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index ef7172551a39..c53cc8f61176 100644

[PATCH v4 11/18] iommu: exynos: remove useless device_add/remove callbacks

2015-01-16 Thread Marek Szyprowski
The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c

[PATCH v4 18/18] iommu: exynos: add callback for initializing devices from device tree

2015-01-16 Thread Marek Szyprowski
This patch adds implementation of of_xlate callback, which prepares masters device for attaching to IOMMU. This callback is called during creating devices from device tree. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28 1 file changed, 28

[PATCH v4 13/18] iommu: exynos: add support for runtime_pm

2015-01-16 Thread Marek Szyprowski
This patch fixes support for runtime power management for SYSMMU controllers, so they are enabled when master device is attached. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu

[PATCH v4 08/18] iommu: exynos: remove useless spinlock

2015-01-16 Thread Marek Szyprowski
This patch removes useless spinlocks and other unused members from struct exynos_iommu_owner. There is no point is protecting this structure by spinlock because content of this structure doesn't change and other structures have their own spinlocks. Signed-off-by: Marek Szyprowski --- dr

[PATCH v4 07/18] iommu: exynos: remove unused functions

2015-01-16 Thread Marek Szyprowski
This patch removes two unneeded functions, which are not a part of generic IOMMU API and were never used by any other driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/iommu/exynos

[PATCH v4 06/18] iommu: exynos: don't read version register on every tlb operation

2015-01-16 Thread Marek Szyprowski
This patch removes reading of REG_MMU_VERSION register on every tlb operation and caches SYSMMU version in driver's internal data. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/

[PATCH v4 12/18] iommu: exynos: add support for binding more than one sysmmu to master device

2015-01-16 Thread Marek Szyprowski
: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index e40e699423a6..c6cca44d7858 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos

[PATCH v4 14/18] iommu: exynos: rename variables to reflect their purpose

2015-01-16 Thread Marek Szyprowski
This patch renames some variables to make the code easier to understand. 'domain' is replaced by 'iommu_domain' (more generic entity) and really meaning less 'priv' by 'domain' to reflect its purpose. Signed-off-by: Marek Szyprowski

[PATCH v4 05/18] ARM: dts: exynos5420: add sysmmu nodes

2015-01-16 Thread Marek Szyprowski
Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos5420.dtsi | 178 ++ 1 file changed, 178 insertions(+) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 03ef2481c640..6d8e73bcfff8 100644 --- a/arch/arm/boot

[PATCH v4 15/18] iommu: exynos: document internal structures

2015-01-16 Thread Marek Szyprowski
Add a few words of comment to all internal structures used by the driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 49 +--- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers

[PATCH v4 17/18] iommu: exynos: init from dt-specific callback instead of initcall

2015-01-16 Thread Marek Szyprowski
This patch introduces IOMMU_OF_DECLARE-based initialization to the driver, which replaces subsys_initcall-based procedure. exynos_iommu_of_setup ensures that each sysmmu controller is probed before its master device. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28

Re: [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2015-01-16 Thread Marek Szyprowski
Hello, On 2014-12-02 10:59, Sjoerd Simons wrote: Hey Marek, Inki, On Wed, 2014-11-19 at 12:15 +0100, Marek Szyprowski wrote: Hello Everyone, This is another attempt to finally make Exynos SYSMMU driver fully integrated with DMA-mapping subsystem. The main change from previous version is a

Re: [PATCH] of/device: add blacklist for iommu dma_ops

2018-12-03 Thread Marek Szyprowski
of_dma_configure(struct device *dev, struct >> device_node *np, bool force_dma) >> dev_dbg(dev, "device is%sbehind an iommu\n", >> iommu ? " " : " not "); >> >> + /* >> +* There is at least one case w

Re: [PATCH 5/9] dma-mapping: support highmem in the generic remap allocator

2018-12-04 Thread Marek Szyprowski
(struct device *dev, size_t >> size, void *vaddr, >>   dma_addr_t dma_handle, unsigned long attrs) >>   { >>   if (!dma_free_from_pool(vaddr, PAGE_ALIGN(size))) { >> -    void *kaddr = phys_to_virt(dma_to_phys(dev, dma_handle)); >> +    phys_addr_t phy

[PATCH] dma-mapping: fix lack of DMA address assignment in generic remap allocator

2018-12-05 Thread Marek Szyprowski
1 ("dma-mapping: support highmem in the generic remap allocator") Signed-off-by: Marek Szyprowski --- kernel/dma/remap.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c index 68a64e3ff6a1..8a44317cfc1a 100644 --- a/kernel

Re: [PATCH 15/15] dma-mapping: bypass indirect calls for dma-direct

2018-12-14 Thread Marek Szyprowski
(dev); > return dma_default_get_required_mask(dev); > @@ -341,7 +344,6 @@ void *dma_alloc_attrs(struct device *dev, size_t size, > dma_addr_t *dma_handle, > const struct dma_map_ops *ops = get_dma_ops(dev); > void *cpu_addr; > > - BUG_ON(!ops); >

Re: [PATCH 15/15] dma-mapping: bypass indirect calls for dma-direct

2018-12-14 Thread Marek Szyprowski
Hi Christoph, On 2018-12-14 15:24, Christoph Hellwig wrote: > On Fri, Dec 14, 2018 at 03:11:37PM +0100, Marek Szyprowski wrote: >> Hi Christoph, >> >> On 2018-12-07 20:07, Christoph Hellwig wrote: >>> Avoid expensive indirect calls in the fast path DMA mapping >

Re: [PATCH 3/4] iommu/of: Don't call iommu_ops->add_device directly

2018-12-19 Thread Marek Szyprowski
ent from ops from local variable. > > /* Ignore all other errors apart from EPROBE_DEFER */ > if (err == -EPROBE_DEFER) { Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 3/4] iommu/of: Don't call iommu_ops->add_device directly

2018-12-19 Thread Marek Szyprowski
Hi Joerg, On 2018-12-19 15:34, Joerg Roedel wrote: > Hi Marek, > > thanks for the report! > > On Wed, Dec 19, 2018 at 10:54:18AM +0100, Marek Szyprowski wrote: >> On 2018-12-11 16:05, Joerg Roedel wrote: >>> From: Joerg Roedel >>> >>> Make

Re: fix a layering violation in videobuf2 and improve dma_map_resource

2019-01-14 Thread Marek Szyprowski
ptions about the DMA mapping internals. Feel free to add my: Reviewed-by: Marek Szyprowski Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 3/3] videobuf2: replace a layering violation with dma_map_resource

2019-01-14 Thread Marek Szyprowski
ed only when no IOMMU is available, but I agree that the hacky code should be replaced by a generic code if possible. Tested-by: Marek Szyprowski V4L2 pipeline works fine on older Exynos-based boards with CMA and IOMMU disabled. > --- > .../common/videobuf2/videobuf2-dma-contig.c | 41

[PATCH] Revert "ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()"

2019-01-14 Thread Marek Szyprowski
stays with non-IOMMU dma_ops. Reported-by: Tobias Jakobi Fixes: 1874619a7df4 "ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()" Signed-off-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --

Re: [PATCH] Revert "ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()"

2019-01-16 Thread Marek Szyprowski
Hi Robin, On 2019-01-14 17:38, Robin Murphy wrote: > On 14/01/2019 16:09, Thierry Reding wrote: >> On Mon, Jan 14, 2019 at 02:22:40PM +0100, Marek Szyprowski wrote: >>> This reverts commit 1874619a7df4b14b23b14877e705ae15325773e3. >>> >>> That patch broke IOMMU

Re: [PATCH 3/3] videobuf2: replace a layering violation with dma_map_resource

2019-01-18 Thread Marek Szyprowski
Hi Christoph, On 2019-01-17 18:21, Christoph Hellwig wrote: > On Mon, Jan 14, 2019 at 01:42:26PM +0100, Marek Szyprowski wrote: >> On 2019-01-11 19:17, Christoph Hellwig wrote: >>> vb2_dc_get_userptr pokes into arm direct mapping details to get the >>> resemblan

Re: fix a layering violation in videobuf2 and improve dma_map_resource v2

2019-01-31 Thread Marek Szyprowski
ma_map_resource > implementation to not provide a somewhat dangerous default and improve > the error handling. > > Changes since v1: > - don't apply bus offsets in dma_direct_map_resource Works fine on older Exynos based boards with IOMMU and CMA disabled. Tested-by: Marek

Re: [PATCH] ARM: dma-mapping: Clear DMA ops on teardown

2019-02-04 Thread Marek Szyprowski
omatically installed by its counterpart. > > Reported-by: Tobias Jakobi > Reported-by: Marek Szyprowski > Fixes: 1874619a7df4 "ARM: dma-mapping: Set proper DMA ops in > arm_iommu_detach_device()" > Tested-by: Tobias Jakobi > Signed-off-by: Robin Murphy > --- > > S

Re: [PATCH] dma-direct: Export dma_direct_alloc() and dma_direct_free()

2019-02-05 Thread Marek Szyprowski
the first CRTC device that has been registered. Then that device is used for DMA-mapping calls. It is not very elegant, but works fine and allows to use standard DMA-mapping calls. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ i

Re: [PATCH] dma-contiguous: do not allocate a single page from CMA area

2019-02-18 Thread Marek Szyprowski
ed from trivial allocations. > > Signed-off-by: Nicolin Chen Acked-by: Marek Szyprowski > --- > kernel/dma/contiguous.c | 22 +++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c > index

[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 deletions(-) diff --git a

[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 --- drivers/iommu/iommu.c

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

2016-02-16 Thread Marek Szyprowski
Marek Szyprowski Samsung R&D Institute Poland Patch summary: Marek Szyprowski (2): iommu: call detach also for default_domain before attaching to new one iommu: fix default domain handling in __iommu_detach_group() drivers/iommu/iommu.c | 48 +++

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

2016-02-16 Thread Marek Szyprowski
architecture. Best regards Marek Szyprowski Samsung R&D Institute Poland Patch summary: Marek Szyprowski (11): iommu: exynos: rework iommu group initialization iommu: exynos: add support for IOMMU_DOMAIN_DMA domain type iommu: exynos: remove ARM-specific cache flush interface iommu: ex

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

2016-02-16 Thread Marek Szyprowski
because all SYSMMU controllers are in the same address space (where DMA address equals physical address) and the DMA-mapping calls are done mainly to flush CPU cache to make changes visible to SYSMMU controllers. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 74

[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 b/drivers/iommu/exynos-iommu.c index 15787a1

[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 --git a/drivers/iommu

[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 --- 1 file changed, 8

[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 +4336,12 @@ L: dri

[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 a/drivers/iommu/exynos-iommu.c b/drivers/iommu

[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 deletions(-) diff --git a/drivers

[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 +++---

<    1   2   3   4   5   6   7   8   9   10   >