[PATCHv6 2/7] ARM: dma-mapping: use asm-generic/dma-mapping-common.h

2012-02-10 Thread Marek Szyprowski
This patch modifies dma-mapping implementation on ARM architecture to use common dma_map_ops structure and asm-generic/dma-mapping-common.h helpers. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/Kconfig

RE: [PATCHv6 7/7] ARM: dma-mapping: add support for IOMMU mapper

2012-02-24 Thread Marek Szyprowski
konrad.w...@oracle.com if you would like on the patch. Thanks for your comments! Best regards -- Marek Szyprowski Samsung Poland RD Center ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

RE: [PATCHv6 7/7] ARM: dma-mapping: add support for IOMMU mapper

2012-02-24 Thread Marek Szyprowski
Hello, On Friday, February 24, 2012 1:50 PM Arnd Bergmann wrote: On Friday 24 February 2012, Marek Szyprowski wrote: +static struct page **__iommu_alloc_buffer(struct device *dev, size_t +size, gfp_t gfp) { + struct page **pages; + int count = size PAGE_SHIFT

RE: [PATCHv6 3/7] ARM: dma-mapping: implement dma sg methods on top of any generic dma ops

2012-02-24 Thread Marek Szyprowski
Hello, On Tuesday, February 14, 2012 4:03 PM Konrad Rzeszutek Wilk wrote: On Fri, Feb 10, 2012 at 07:58:40PM +0100, Marek Szyprowski wrote: This patch converts all dma_sg methods to be generic (independent of the current DMA mapping implementation for ARM architecture). All dma sg

RE: [PATCH v8 0/2] ommu/exynos: Add IOMMU/System MMU driver for Samsung Exynos

2012-02-24 Thread Marek Szyprowski
anytime soon? It will be really nice to have it finally merged to v3.4. Best regards -- Marek Szyprowski Samsung Poland RD Center ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCHv7 4/9] ARM: dma-mapping: use asm-generic/dma-mapping-common.h

2012-02-29 Thread Marek Szyprowski
This patch modifies dma-mapping implementation on ARM architecture to use common dma_map_ops structure and asm-generic/dma-mapping-common.h helpers. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/Kconfig

[PATCHv7 8/9] ARM: dma-mapping: use alloc, mmap, free from dma_ops

2012-02-29 Thread Marek Szyprowski
This patch converts dma_alloc/free/mmap_{coherent,writecombine} functions to use generic alloc/free/mmap methods from dma_map_ops structure. A new DMA_ATTR_WRITE_COMBINE DMA attribute have been introduced to implement writecombine methods. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

RE: [PATCH v9 0/2] iommu/exynos: Add IOMMU/System MMU driver for Samsung Exynos

2012-03-01 Thread Marek Szyprowski
, v3.3-rc5 and kgene/for-next). It looks that you have used some internal tree because cannot find arch/arm/mach-exynos/clock-exynos5.c or arch/arm/mach-exynos/clock-exynos4212.c files in any of the public git repositories. Best regards -- Marek Szyprowski Samsung Poland RD Center

RE: [PATCH v9 1/2] ARM: EXYNOS: Change System MMU platform device definitions

2012-03-01 Thread Marek Szyprowski
exynos4 and exynos5. FIMC devices use s5p-fimc name in the mainline kernel. The driver is already there so there, so please don't change it. 4 more lines with proper 'fimc' name will not cause any problems. Best regards -- Marek Szyprowski Samsung Poland RD Center

RE: [PATCH v12 3/3] iommu/exynos: Add iommu driver for Exynos Platforms

2012-03-26 Thread Marek Szyprowski
, + .name = exynos-sysmmu, + } +}; + (snipped) Best regards -- Marek Szyprowski Samsung Poland RD Center ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

RE: [PATCHv7 9/9] ARM: dma-mapping: add support for IOMMU mapper

2012-03-29 Thread Marek Szyprowski
Hello, On Thursday, March 29, 2012 9:19 AM Hiroshi Doyu wrote: On Wed, 29 Feb 2012 16:04:22 +0100 Marek Szyprowski m.szyprow...@samsung.com wrote: This patch add a complete implementation of DMA-mapping API for devices that have IOMMU support. All DMA-mapping calls are supported

RE: [PATCHv7 9/9] ARM: dma-mapping: add support for IOMMU mapper

2012-03-30 Thread Marek Szyprowski
regards -- Marek Szyprowski Samsung Poland RD Center ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCHv8 02/10] ARM: dma-mapping: use pr_* instread of printk

2012-04-10 Thread Marek Szyprowski
Replace all calls to printk with pr_* functions family. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/mm/dma-mapping.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/mm/dma

[PATCHv8 10/10] ARM: dma-mapping: add support for IOMMU mapper

2012-04-10 Thread Marek Szyprowski
...@nvidia.com, - Andrzej Pietrasiewicz andrze...@samsung.com, - Hiroshi DOYU hd...@nvidia.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/arm/Kconfig |8

[PATCHv8 07/10] ARM: dma-mapping: move all dma bounce code to separate dma ops structure

2012-04-10 Thread Marek Szyprowski
This patch removes dma bounce hooks from the common dma mapping implementation on ARM architecture and creates a separate set of dma_map_ops for dma bounce devices. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/common

[PATCHv8 08/10] ARM: dma-mapping: remove redundant code and cleanup

2012-04-10 Thread Marek Szyprowski
This patch just performs a global cleanup in DMA mapping implementation for ARM architecture. Some of the tiny helper functions have been moved to the caller code, some have been merged together. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p

[PATCHv8 01/10] common: add dma_mmap_from_coherent() function

2012-04-10 Thread Marek Szyprowski
Add a common helper for dma-mapping core for mapping a coherent buffer to userspace. Reported-by: Subash Patel subas...@gmail.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/base/dma-coherent.c| 42

[PATCHv8 05/10] ARM: dma-mapping: use asm-generic/dma-mapping-common.h

2012-04-10 Thread Marek Szyprowski
This patch modifies dma-mapping implementation on ARM architecture to use common dma_map_ops structure and asm-generic/dma-mapping-common.h helpers. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/Kconfig

[PATCHv8 04/10] ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops

2012-04-10 Thread Marek Szyprowski
This patch removes the need for offset parameter in dma bounce functions. This is required to let dma-mapping framework on ARM architecture use common, generic dma-mapping helpers. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- arch

[PATCHv8 09/10] ARM: dma-mapping: use alloc, mmap, free from dma_ops

2012-04-10 Thread Marek Szyprowski
This patch converts dma_alloc/free/mmap_{coherent,writecombine} functions to use generic alloc/free/mmap methods from dma_map_ops structure. A new DMA_ATTR_WRITE_COMBINE DMA attribute have been introduced to implement writecombine methods. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCHv8 06/10] ARM: dma-mapping: implement dma sg methods on top of any generic dma ops

2012-04-10 Thread Marek Szyprowski
This patch converts all dma_sg methods to be generic (independent of the current DMA mapping implementation for ARM architecture). All dma sg operations are now implemented on top of respective dma_map_page/dma_sync_single_for* operations from dma_map_ops structure. Signed-off-by: Marek

RE: [PATCHv8 07/10] ARM: dma-mapping: move all dma bounce code to separate dma ops structure

2012-04-10 Thread Marek Szyprowski
Hi Arnd, On Tuesday, April 10, 2012 2:24 PM Arnd Bergmann wrote: On Tuesday 10 April 2012, Marek Szyprowski wrote: This patch removes dma bounce hooks from the common dma mapping implementation on ARM architecture and creates a separate set of dma_map_ops for dma bounce devices

RE: [PATCHv8 10/10] ARM: dma-mapping: add support for IOMMU mapper

2012-04-10 Thread Marek Szyprowski
Hi Arnd, On Tuesday, April 10, 2012 1:58 PM Arnd Bergmann wrote: On Tuesday 10 April 2012, Marek Szyprowski wrote: +/** + * arm_iommu_create_mapping + * @bus: pointer to the bus holding the client device (for IOMMU calls) + * @base: start address of the valid IO address space

RE: [PATCHv8 04/10] ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops

2012-04-11 Thread Marek Szyprowski
Hi Arnd, On Tuesday, April 10, 2012 1:43 PM Arnd Bergmann wrote: On Tuesday 10 April 2012, Marek Szyprowski wrote: This patch removes the need for offset parameter in dma bounce functions. This is required to let dma-mapping framework on ARM architecture use common, generic dma-mapping

RE: [PATCHv8 05/10] ARM: dma-mapping: use asm-generic/dma-mapping-common.h

2012-04-11 Thread Marek Szyprowski
Hi Arnd, On Tuesday, April 10, 2012 1:47 PM Arnd Bergmann wrote: On Tuesday 10 April 2012, Marek Szyprowski wrote: This patch modifies dma-mapping implementation on ARM architecture to use common dma_map_ops structure and asm-generic/dma-mapping-common.h helpers. Signed-off-by: Marek

RE: [PATCHv8 04/10] ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops

2012-04-11 Thread Marek Szyprowski
Hi Arnd, On Wednesday, April 11, 2012 2:19 PM Arnd Bergmann wrote: On Wednesday 11 April 2012, Marek Szyprowski wrote: Well, range sync functions are available from the early days of the dma mapping api (at least that's what I've found reading the change log and old patches

[PATCH 0/2] Exynos: fix SYSMMU driver to work with power domains

2012-04-11 Thread Marek Szyprowski
Hi! These two patches fixes operation of the SYSMMU driver (v12 version [1]) with the new power domain driver based on generic power domains and runtime pw, which has been merged to Linux kernel v3.4-rc1. [1] https://lkml.org/lkml/2012/3/15/51 Best regards Marek Szyprowski Samsung Poland RD

[PATCH 1/2] iommu/exynos: fix runtime pm support

2012-04-11 Thread Marek Szyprowski
Fix registration to runtime pw and add missing resume callback. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/iommu/exynos-iommu.c | 20 ++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] ARM: Exynos4: update SYSMMU setup code for gen_pd power domain driver

2012-04-11 Thread Marek Szyprowski
SYSMMU platform devices must be registered before setting up power domains to let power domain driver to correctly register also SYSMMU controller devices. This patch also registers SYSMMU controller devices to respective power domains. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH/RFC] ARM: Exynos4: Integrate IOMMU aware DMA-mapping

2012-04-11 Thread Marek Szyprowski
Szyprowski Samsung Poland RD Center Patch summary: Marek Szyprowski (1): ARM: Exynos4: integrate SYSMMU driver with DMA-mapping interface arch/arm/mach-exynos/Kconfig |1 + arch/arm/mach-exynos/clock-exynos4.c | 64 +++- arch/arm/mach-exynos/dev

[PATCH] ARM: Exynos4: integrate SYSMMU driver with DMA-mapping interface

2012-04-11 Thread Marek Szyprowski
. This reduces the size of the io address space bitmap to 4 KiB. To solve the clock dependency issues, parent clocks have been added to each SYSMMU controller bus clock. This models the true hardware behavior, because client's device bus clock also gates the respective sysmmu bus clock. Signed-off-by: Marek

RE: [RFC 4/4] drm: Add NVIDIA Tegra support

2012-04-12 Thread Marek Szyprowski
the kernel tree there aren't any users that map DMA memory through an IOMMU. dma_map_sg is certainly the right interface to use, and Marek Szyprowski has patches to make that work on ARM, hopefully going into v3.5, so you could use those. I've looked at Marek's patches but I don't

RE: [PATCH] ARM: Exynos4: integrate SYSMMU driver with DMA-mapping interface

2012-04-12 Thread Marek Szyprowski
Hi Subash, On Thursday, April 12, 2012 11:06 AM Subash Patel wrote: On 04/11/2012 08:06 PM, Marek Szyprowski wrote: This patch provides an provides setup code which assigns IOMMU controllers to FIMC and MFC devices and enables IOMMU aware DMA-mapping for them. It has been tested

RE: [PATCHv8 10/10] ARM: dma-mapping: add support for IOMMU mapper

2012-04-12 Thread Marek Szyprowski
Hi Arnd, On Tuesday, April 10, 2012 1:58 PM Arnd Bergmann wrote: On Tuesday 10 April 2012, Marek Szyprowski wrote: +/** + * arm_iommu_create_mapping + * @bus: pointer to the bus holding the client device (for IOMMU calls) + * @base: start address of the valid IO address space

RE: [PATCH] ARM: Exynos4: integrate SYSMMU driver with DMA-mapping interface

2012-04-12 Thread Marek Szyprowski
-Original Message- From: Arnd Bergmann [mailto:a...@arndb.de] Sent: Thursday, April 12, 2012 1:09 PM To: Marek Szyprowski Cc: 'Subash Patel'; linux-arm-ker...@lists.infradead.org; linaro-mm-...@lists.linaro.org; linux...@kvack.org; linux-a...@vger.kernel.org; iommu

RE: [PATCH 2/2] ARM: Exynos4: update SYSMMU setup code for gen_pd power domain driver

2012-04-16 Thread Marek Szyprowski
Hi, On Monday, April 16, 2012 12:10 PM KyongHo Cho wrote: On Wed, Apr 11, 2012 at 11:34 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: SYSMMU platform devices must be registered before setting up power domains to let power domain driver to correctly register also SYSMMU controller

[PATCHv9 02/10] ARM: dma-mapping: use pr_* instread of printk

2012-04-18 Thread Marek Szyprowski
Replace all calls to printk with pr_* functions family. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Arnd Bergmann a...@arndb.de Tested-By: Subash Patel subash.ramasw...@linaro.org --- arch/arm/mm/dma-mapping.c | 16

[PATCHv9 08/10] ARM: dma-mapping: remove redundant code and cleanup

2012-04-18 Thread Marek Szyprowski
This patch just performs a global cleanup in DMA mapping implementation for ARM architecture. Some of the tiny helper functions have been moved to the caller code, some have been merged together. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p

[PATCHv9 00/10] ARM: DMA-mapping framework redesign

2012-04-18 Thread Marek Szyprowski
/msg29903.html v7: http://www.spinics.net/lists/arm-kernel/msg162149.html v8: http://www.spinics.net/lists/arm-kernel/msg168478.html Best regards Marek Szyprowski Samsung Poland RD Center Patch summary: Marek Szyprowski (10): common: add dma_mmap_from_coherent() function ARM: dma-mapping

[PATCHv10 00/11] ARM: DMA-mapping framework redesign

2012-05-17 Thread Marek Szyprowski
://www.spinics.net/lists/arm-kernel/msg162149.html v8: http://www.spinics.net/lists/arm-kernel/msg168478.html v9: http://www.spinics.net/lists/linux-arch/msg17443.html Best regards Marek Szyprowski Samsung Poland RD Center Patch summary: Marek Szyprowski (11): common: add dma_mmap_from_coherent

[PATCHv10 01/11] common: add dma_mmap_from_coherent() function

2012-05-17 Thread Marek Szyprowski
Add a common helper for dma-mapping core for mapping a coherent buffer to userspace. Reported-by: Subash Patel subas...@gmail.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com Tested-By: Subash Patel subash.ramasw...@linaro.org

[PATCHv10 02/11] ARM: dma-mapping: use dma_mmap_from_coherent()

2012-05-17 Thread Marek Szyprowski
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/mm/dma-mapping.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index db23ae4..7ec0863 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c

[PATCHv10 04/11] ARM: dma-mapping: introduce DMA_ERROR_CODE constant

2012-05-17 Thread Marek Szyprowski
Replace all uses of ~0 with DMA_ERROR_CODE, what should make the code easier to read. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com Tested-By: Subash Patel subash.ramasw...@linaro.org --- arch/arm/common/dmabounce.c|6

RE: How to specify IOMMU'able devices in DT (was: [RFC 0/5] ARM: dma-mapping: New dma_map_ops to control IOVA more precisely)

2012-09-24 Thread Marek Szyprowski
, not arch specific. Please read more about bus notifiers. IMHO a good example is provided in the following thread: http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12238.html Best regards -- Marek Szyprowski Samsung Poland RD Center ___ iommu

Re: [PATCH 3/9] ARM: dma-mapping: Always pass proper prot flags to iommu_map()

2013-09-30 Thread Marek Szyprowski
: Marek Szyprowski m.szyprow...@samsung.com Signed-off-by: Andreas Herrmann andreas.herrm...@calxeda.com Thanks pointing the issue and preparing the patch. I will push it to the dma-mapping fixes branch. --- arch/arm/mm/dma-mapping.c | 43 --- 1 file

Re: [PATCH v2 3/5] intel-iommu: integrate DMA CMA

2014-01-16 Thread Marek Szyprowski
by dma_alloc_from_contiguous() and alloc_pages() is used as a fallback. Cc: Marek Szyprowski m.szyprow...@samsung.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: David Woodhouse dw...@infradead.org Cc: Don Dutile ddut...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

Re: [PATCH v2 1/5] x86: make dma_alloc_coherent() return zeroed memory if CMA is enabled

2014-01-27 Thread Marek Szyprowski
is specified. So this fixes it by unconditionally zeroing the allocated memory region. Cc: Marek Szyprowski m.szyprow...@samsung.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: David Woodhouse dw...@infradead.org Cc: Don Dutile ddut...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo

[PATCH 0/2] arm: dma-mapping: add dynamic resize of IOVA bitmap

2014-02-25 Thread Marek Szyprowski
. This parameter was already a bit misunderstood, so the overall result is also a little improvement of the API. Best regards Marek Szyprowski, PhD Samsung RD Institute Poland Andreas Herrmann (1): arm: dma-mapping: Add support to extend DMA IOMMU mappings Marek Szyprowski (1): arm: dma-mapping

[PATCH 1/2] arm: dma-mapping: Add support to extend DMA IOMMU mappings

2014-02-25 Thread Marek Szyprowski
anyway, also some debug messages about extending bitmap] Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/include/asm/dma-iommu.h |8 ++- arch/arm/mm/dma-mapping.c| 123 -- 2 files changed, 110 insertions(+), 21 deletions(-) diff

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

2014-04-04 Thread Marek Szyprowski
, Mar 14, 2014 at 12:00:16PM +0100, Laurent Pinchart wrote: 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

Re: [PATCH] arm: dma-mapping: Fix mapping size value

2014-04-22 Thread Marek Szyprowski
; mapping-bits = BITS_PER_BYTE * bitmap_size; + mapping-size = mapping-bits PAGE_SHIFT; spin_lock_init(mapping-lock); Best regards -- Marek Szyprowski, PhD Samsung RD Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https

Re: [PATCH] arm: dma-mapping: Fix mapping size value

2014-04-23 Thread Marek Szyprowski
references of mapping-size with (mapping-bits PAGE_SHIFT), probably with some temporary variable to make the code easier to understand? I've didn't apply your patch yet. Best regards -- Marek Szyprowski, PhD Samsung RD Institute Poland ___ iommu mailing list

Re: [PATCH] arm: dma-mapping: Fix mapping size value

2014-04-23 Thread Marek Szyprowski
Hello, On 2014-04-23 12:04, Ritesh Harjani wrote: Hi Marek/Will On Wed, Apr 23, 2014 at 3:00 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Marek, On Wednesday 23 April 2014 10:53:24 Marek Szyprowski wrote: On 2014-04-22 10:53, Will Deacon wrote: On Mon, Apr 21, 2014

Re: [PATCH v2] arm: dma-iommu: Clean up redundant variable

2014-05-20 Thread Marek Szyprowski
; spin_lock_init(mapping-lock); Best regards -- Marek Szyprowski, PhD Samsung RD Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH 07/29] ARM: dma-mapping: arm_iommu_attach_device: automatically set max_seg_size

2014-08-05 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 m.szyprow...@samsung.com --- arch/arm/mm/dma-mapping.c | 16 1 file changed, 16 insertions

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

2014-08-05 Thread Marek Szyprowski
files changed, 1016 insertions(+), 356 deletions(-) Best regards Marek Szyprowski Samsung RD Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH 08/29] ARM: dma-mapping: add helpers for managing default per-device dma mappings

2014-08-05 Thread Marek Szyprowski
devices in the system. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/include/asm/dma-iommu.h | 5 + arch/arm/mm/dma-mapping.c| 31 +++ 2 files changed, 36 insertions(+) diff --git a/arch/arm/include/asm/dma-iommu.h b/arch/arm/include

[PATCH 02/29] ARM: Exynos: bind power domains earlier, on device creation

2014-08-05 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 m.szyprow...@samsung.com --- arch/arm/mach-exynos

[PATCH 11/29] DRM: exynos: add DRIVER_HAS_OWN_IOMMU_MANAGER flag to all sub-drivers

2014-08-05 Thread Marek Szyprowski
Exynos DRM drivers do their own management of IO address space of all controlled devices, so set DRIVER_HAS_OWN_IOMMU_MANAGER flag to instruct IOMMU subsystem not to create any defaults for them. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/gpu/drm/exynos

[PATCH 09/29] ARM: dma-mapping: provide stubs if no ARM_DMA_USE_IOMMU has been selected

2014-08-05 Thread Marek Szyprowski
This patch provides stubs returing errors for all iommu related arm dma-mapping functions, which are used when CONFIG_ARM_DMA_USE_IOMMU is not set. This let drivers to use common code for iommu and non-iommu cases without additional ifdefs. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 18/29] iommu: exynos: remove unused functions

2014-08-05 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 m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 31 --- 1 file changed, 31 deletions(-) diff

[PATCH 14/29] devicetree: Update Exynos SYSMMU device tree bindings

2014-08-05 Thread Marek Szyprowski
This patch describes how generic iommu bindings are implemented by Exynos SYSMMU driver. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- .../devicetree/bindings/iommu/samsung,sysmmu.txt | 93 +++--- 1 file changed, 84 insertions(+), 9 deletions(-) diff --git

[PATCH 05/29] drivers: convert suppress_bind_attrs parameter into flags

2014-08-05 Thread Marek Szyprowski
This patch extends struct device_driver with a flags member and converts existing suppress_bind_attrs bool field to a flag. This way new flags can be easily added in the future without changing the structure itself. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/mach

[PATCH 20/29] iommu: exynos: refactor function parameters to simplify code

2014-08-05 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 m.szyprow...@samsung.com

[PATCH 13/29] temporary: media: s5p-mfc: remove DT hacks initialization custom memory init code

2014-08-05 Thread Marek Szyprowski
This patch removes custom initialization of reserved memory regions from s5p-mfc driver. Driver will use main device pointer for all memory allocations. This patch is temporary, do not merge it yet. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/media/platform/s5p-mfc

[PATCH 12/29] DRM: Exynos: fix window clear code

2014-08-05 Thread Marek Szyprowski
fimd_wait_for_vblank function really to do its job. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers

[PATCH 04/29] drivers: base: add notifier for failed driver bind

2014-08-05 Thread Marek Szyprowski
This patch adds support for getting a notify for failed device driver bind, so all the items done in BUS_NOTIFY_BIND_DRIVER event can be cleaned if the driver fails to bind. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/base/dd.c | 10 +++--- include/linux

[PATCH 10/29] drivers: add DRIVER_HAS_OWN_IOMMU_MANAGER flag

2014-08-05 Thread Marek Szyprowski
This patch adds a new flags for device drivers. This flag instructs kernel that the device driver does it own management of IOMMU assisted IO address space translations, so no default dma-mapping structures should be initialized. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

[PATCH 03/29] clk: exynos: add missing smmu_g2d clock and update comments

2014-08-05 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 m.szyprow...@samsung.com --- drivers/clk/samsung

[PATCH 17/29] iommu: exynos: don't read version register on every tlb operation

2014-08-05 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 m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff

[PATCH 25/29] iommu: exynos: add support for runtime_pm

2014-08-05 Thread Marek Szyprowski
if there are no other devices enabled. This way, the SYSMMU drivers get a genpd pm event and save its state with sysmmu_save_state() function. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 54 +++- 1 file changed, 53

[PATCH 16/29] iommu: exynos: make driver multiarch friendly

2014-08-05 Thread Marek Szyprowski
Initialize all structures and register to iommu subsystem only on Exynos compatible platforms. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos

[PATCH 19/29] iommu: exynos: remove useless spinlock

2014-08-05 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 m.szyprow

[PATCH 15/29] ARM: DTS: Exynos4: add System MMU nodes

2014-08-05 Thread Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/boot/dts/exynos4.dtsi| 118 ++ arch/arm/boot/dts/exynos4210.dtsi | 23 arch/arm/boot/dts

[PATCH 23/29] iommu: exynos: init iommu controllers from device tree

2014-08-05 Thread Marek Szyprowski
This patch adds code to initialize and assign SYSMMU controllers to their master devices defined in device tree. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 152 +-- 1 file changed, 145 insertions(+), 7

[PATCH 27/29] iommu: exynos: document internal structures

2014-08-05 Thread Marek Szyprowski
Add a few words of comment to all internal structures used by the driver. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 59 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/drivers/iommu

[PATCH 21/29] iommu: exynos: remove unused functions, part 2

2014-08-05 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 m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 43

[PATCH 26/29] iommu: exynos: rename variables to reflect their purpose

2014-08-05 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 m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 191

[PATCH 24/29] iommu: exynos: create default iommu-based dma-mapping for master devices

2014-08-05 Thread Marek Szyprowski
This patch adds code to create default per-device iommu-based dma-mapping instance for all master devices, whose driver didn't set DRIVER_HAS_OWN_IOMMU_MANAGER flag. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 49

[PATCH 28/29] iommu: exynos: remove excessive includes and sort others alphabetically

2014-08-05 Thread Marek Szyprowski
Removed following unused includes: linux/mm.h, linux/errno.h, linux/memblock.h and linux/export.h. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/iommu

[PATCH 22/29] iommu: exynos: add support for binding more than one sysmmu to master device

2014-08-05 Thread Marek Szyprowski
-by: Marek Szyprowski m.szyprow...@samsung.com --- 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 674d1fb..46e0edc 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers

[PATCH 29/29] temporary: media: s5p-mfc: add support for IOMMU

2014-08-05 Thread Marek Szyprowski
This patch is an example how to use more than one IOMMU controller in a device driver for hardware blocks, which have more then one dma master (memory interface with iommu controller). This patch is temporary, do not merge it yet. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com

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

2014-08-19 Thread Marek Szyprowski
Hello, On 2014-08-19 01:32, Joerg Roedel wrote: On Tue, Aug 05, 2014 at 12:47:28PM +0200, Marek Szyprowski wrote: .../devicetree/bindings/iommu/samsung,sysmmu.txt | 93 ++- Documentation/power/notifiers.txt | 14 + arch/arm/boot/dts/exynos4.dtsi

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

2014-08-19 Thread Marek Szyprowski
Hello, On 2014-08-19 13:39, Andreas Färber wrote: Hi Marek and Inki, Am 19.08.2014 08:07, schrieb Marek Szyprowski: On 2014-08-19 01:32, Joerg Roedel wrote: On Tue, Aug 05, 2014 at 12:47:28PM +0200, Marek Szyprowski wrote: [...] 33 files changed, 1016 insertions(+), 356 deletions

Re: [PATCH 04/29] drivers: base: add notifier for failed driver bind

2014-08-26 Thread Marek Szyprowski
Hello, On 2014-08-25 22:05, Greg Kroah-Hartman wrote: On Tue, Aug 05, 2014 at 12:47:32PM +0200, Marek Szyprowski wrote: This patch adds support for getting a notify for failed device driver bind, so all the items done in BUS_NOTIFY_BIND_DRIVER event can be cleaned if the driver fails to bind

Re: [PATCH 04/29] drivers: base: add notifier for failed driver bind

2014-08-26 Thread Marek Szyprowski
Hello, On 2014-08-25 23:18, Joerg Roedel wrote: On Tue, Aug 05, 2014 at 12:47:32PM +0200, Marek Szyprowski wrote: + if (failed dev-bus) + blocking_notifier_call_chain(dev-bus-p-bus_notifier, +BUS_NOTIFY_DRVBIND_FAILED, dev

Re: [PATCH 10/29] drivers: add DRIVER_HAS_OWN_IOMMU_MANAGER flag

2014-08-31 Thread Marek Szyprowski
Hi Greg, On 2014-08-05 12:47, Marek Szyprowski wrote: This patch adds a new flags for device drivers. This flag instructs kernel that the device driver does it own management of IOMMU assisted IO address space translations, so no default dma-mapping structures should be initialized. Signed-off

Re: [PATCH 10/29] drivers: add DRIVER_HAS_OWN_IOMMU_MANAGER flag

2014-09-01 Thread Marek Szyprowski
Hello, On 2014-09-01 11:38, Arnd Bergmann wrote: On Monday 01 September 2014 09:53:29 Marek Szyprowski wrote: On 2014-09-01 09:07, Thierry Reding wrote: On Mon, Sep 01, 2014 at 07:22:32AM +0200, Marek Szyprowski wrote: Hi Greg, On 2014-08-05 12:47, Marek Szyprowski wrote: This patch adds

Re: [PATCH 10/29] drivers: add DRIVER_HAS_OWN_IOMMU_MANAGER flag

2014-09-01 Thread Marek Szyprowski
Hello, On 2014-09-01 13:56, Arnd Bergmann wrote: On Monday 01 September 2014 12:47:08 Marek Szyprowski wrote: Who do you think needs to set this flag, and who needs to read it? In the proposed solution Exynos IOMMU driver creates a separate IO address space for every client device in a system

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

2014-09-02 Thread Marek Szyprowski
work, but I wonder if I should select this version as a base or wait a bit for an update. Best regards -- Marek Szyprowski, PhD Samsung RD Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman

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

2014-09-02 Thread Marek Szyprowski
Hi Will, On 2014-09-02 10:31, Will Deacon wrote: On Tue, Sep 02, 2014 at 07:26:01AM +0100, Marek Szyprowski wrote: On 2014-08-29 17:54, Will Deacon wrote: This patch series is an RFC to implement IOMMU master configuration into of_dma_configure. I haven't yet ported any IOMMU drivers

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

2014-09-02 Thread Marek Szyprowski
Hi Arnd, On 2014-09-02 10:56, Arnd Bergmann wrote: On Tuesday 02 September 2014 10:48:02 Marek Szyprowski wrote: -- I have concerns that allocating one domain per master might be too much, but it's hard to tell without an IOMMU driver ported over. One domain per master is IMHO a sane

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

2014-09-02 Thread Marek Szyprowski
Hi Will, On 2014-09-02 12:57, Will Deacon wrote: On Tue, Sep 02, 2014 at 11:42:13AM +0100, Marek Szyprowski wrote: On 2014-09-02 10:56, Arnd Bergmann wrote: On Tuesday 02 September 2014 10:48:02 Marek Szyprowski wrote: -- I have concerns that allocating one domain per master might be too

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

2014-09-02 Thread Marek Szyprowski
Hi Arnd, On 2014-09-02 14:22, Arnd Bergmann wrote: On Tuesday 02 September 2014 12:42:13 Marek Szyprowski wrote: On 2014-09-02 10:56, Arnd Bergmann wrote: On Tuesday 02 September 2014 10:48:02 Marek Szyprowski wrote: -- I have concerns that allocating one domain per master might be too

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

2014-09-02 Thread Marek Szyprowski
On 2014-09-02 14:46, Arnd Bergmann wrote: On Tuesday 02 September 2014 14:30:36 Marek Szyprowski wrote: However we also need to figure out how to let drivers to make their own configuration, like it is required by Exynos DRM subsystem, which consist of several devices, each having its own

Re: [RFC PATCH v2 3/7] iommu: add new iommu_ops callback for adding an OF device

2014-09-10 Thread Marek Szyprowski
device *dev, struct of_phandle_args *args); +#endif + unsigned long pgsize_bitmap; }; Best regards -- Marek Szyprowski, PhD Samsung RD Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https

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

2014-09-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 m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff

[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 m.szyprow...@samsung.com Acked-by: Tomasz Figa t.f

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

2014-09-16 Thread Marek Szyprowski
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 RD Institute Poland

[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 m.szyprow...@samsung.com --- arch/arm/mm/dma-mapping.c | 16 1 file changed, 16 insertions

  1   2   3   4   5   6   7   8   >