Re: [PATCH 3/4] iommu/arm-smmu-v3: Use NUMA memory allocations for stream tables and comamnd queues

2017-09-29 Thread Marek Szyprowski
be allocated in NUMA-aware way? On the other hand it is not that hard to add required dma_sync_* calls around all the code which updated those tables. > ... Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list io

[PATCH] iommu/exynos: Rework runtime PM links management

2017-09-15 Thread Marek Szyprowski
add_device is a bit more suitable for establishing runtime PM links than the xlate callback. This change also makes it possible to implement proper cleanup - in remove_device callback. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.

Re: [PATCH] MAINTAINERS: use the iommu list for the dma-mapping subsystem

2017-09-01 Thread Marek Szyprowski
. On the other hand the dma-mapping subsystem is small enough that a list on its own would be silly. So use the list for the closes subsystem instead instead. Signed-off-by: Christoph Hellwig <h...@lst.de> Like I already said, its fine for me. Acked-by: Marek Szyprowski <m.szyprow...@sa

Re: [PATCH 1/3] iommu: exynos: constify iommu_ops

2017-08-28 Thread Marek Szyprowski
com> Acked-by: Marek Szyprowski <m.szyprow...@samsung.com> I remember that in the past there were a reason for non-const iommu_ops in the IOMMU API, but I hope it has been finally resolved. --- drivers/iommu/exynos-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH] iommu/exynos: Remove custom platform device registration code

2017-08-04 Thread Marek Szyprowski
e gives us an opportunity to use standard platform device registration method also for Exynos SYSMMU controllers. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 36 +--- 1 file changed, 9 insertions(+), 27 deletion

Re: mailing list for the dma mapping code

2017-07-30 Thread Marek Szyprowski
that there is a fair amount of overlap. I don't think that having one more mailing list is really needed. IOMMU ml is fine for me if its current users are not against using also for generic DMA-mapping related talks. Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Marek Szyprowski
Hi Rob, On 2017-07-13 14:10, Rob Clark wrote: On Thu, Jul 13, 2017 at 8:02 AM, Marek Szyprowski <m.szyprow...@samsung.com> wrote: On 2017-07-13 13:50, Rob Clark wrote: On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R <sricha...@codeaurora.org> wrote: On 7/13/2017 10:43 AM, Vivek

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Marek Szyprowski
already lost and its respective power domain might be already turned off, so there is no point in touching IOMMU registers. Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux

Re: new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-21 Thread Marek Szyprowski
Hi Christoph, On 2017-06-20 15:16, Christoph Hellwig wrote: On Tue, Jun 20, 2017 at 11:04:00PM +1000, Stephen Rothwell wrote: git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git#dma-mapping-next Contacts: Marek Szyprowski and Kyungmin Park (cc'd) I have called your tree dma-mapping

Re: [PATCH V11 00/11] IOMMU probe deferral support

2017-05-08 Thread Marek Szyprowski
| 10 ++- 18 files changed, 312 insertions(+), 322 deletions(-) Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH] iommu/exynos: Use smarter TLB flush method for v5 SYSMMU

2017-03-24 Thread Marek Szyprowski
SYSMMU v5 has dedicated registers to perform TLB flush range operation, so use them instead of looping with FLUSH_ENTRY command. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 20 1 file changed, 16 insertions(+), 4 del

[PATCH] iommu/exynos: Don't open-code loop unrolling

2017-03-24 Thread Marek Szyprowski
IOMMU domain allocation is not performance critical operation, so remove hand made optimisation of unrolled initialization loop and leave this to the compiler. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 12 ++-- 1 file chan

[PATCH 1/2] iommu/exynos: Block SYSMMU while invalidating FLPD cache

2017-03-20 Thread Marek Szyprowski
Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- This issue has been introduced long time ago, but this fix applies only for v4.10+ kernels due to other changes in the surrounding code. --- drivers/iommu/exynos-iommu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH 2/2] iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5

2017-03-20 Thread Marek Szyprowski
. To workaround this issue perform a full TLB/FLPD invalidation in case of replacing any first level page descriptors in case of SYSMMU v5. Fixes: 740a01eee9ada ("iommu/exynos: Add support for v5 SYSMMU") CC: sta...@vger.kernel.org # v4.10+ Signed-off-by: Marek Szyprowski <m.szyprow..

[PATCH v2] iommu: iova: Consolidate code for adding new node to iovad domain rbtree

2017-02-24 Thread Marek Szyprowski
This patch consolidates almost the same code used in iova_insert_rbtree() and __alloc_and_insert_iova_range() functions. While touching this code, replace BUG() with WARN_ON(1) to avoid taking down the whole system in case of corrupted iova tree or incorrect calls. Signed-off-by: Marek Szyprowski

[PATCH] iommu: iova: Consolidate code for adding new node to iovad domain rbtree

2017-02-23 Thread Marek Szyprowski
This patch consolidates almost the same code used in iova_insert_rbtree() and __alloc_and_insert_iova_range() functions. There is no functional change. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/iova.c | 85 +++--

Re: [PATCH 10/11] iommu/exynos: Make use of iommu_device_register interface

2017-02-10 Thread Marek Szyprowski
Hi On 2017-02-09 12:32, Joerg Roedel wrote: From: Joerg Roedel <jroe...@suse.de> Register Exynos IOMMUs to the IOMMU core and make them visible in sysfs. This patch does not add the links between IOMMUs and translated devices yet. Cc: Marek Szyprowski <m.szyprow...@samsung.com> C

Re: [PATCH 09/10] iommu/exynos: Make use of iommu_device_register interface

2017-02-08 Thread Marek Szyprowski
Hi Joerg, On 2017-02-08 14:57, Joerg Roedel wrote: On Tue, Feb 07, 2017 at 01:36:15PM +0100, Marek Szyprowski wrote: + ret = iommu_device_sysfs_add(>iommu, >dev, NULL, +"sysmmu.%pa", ); Can we stick to the common name across th

Re: [PATCH 09/10] iommu/exynos: Make use of iommu_device_register interface

2017-02-07 Thread Marek Szyprowski
Hi Joerg, On 2017-02-06 17:10, Joerg Roedel wrote: From: Joerg Roedel <jroe...@suse.de> Register Exynos IOMMUs to the IOMMU core and make them visible in sysfs. This patch does not add the links between IOMMUs and translated devices yet. Cc: Marek Szyprowski <m.szyprow...@samsun

Re: [PATCH V7 00/11] IOMMU probe deferral support

2017-01-23 Thread Marek Szyprowski
the reworked patches [2] from Robin's branch and rebased on top of Lorenzo's ACPI IORT ARM support series [3]. * Tested with platform and pci devices for probe deferral and reprobe on arm64 based platform. * Need help for testing with ACPI. Once again: Tested-by: Marek Szyprowski <m.szyp

[PATCH v2 1/4] iommu/exynos: Improve page fault debug message

2017-01-09 Thread Marek Szyprowski
/developer not equipped with hardware debugging tools. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c

[PATCH v2 2/4] iommu/exynos: Fix warnings from DMA-debug

2017-01-09 Thread Marek Szyprowski
-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 058ee8425f35..b0d537e6a445 100644 --- a/drivers/iommu/exynos-iommu.c

[PATCH v2 4/4] iommu/exynos: Properly release device from the default domain in ->remove

2017-01-09 Thread Marek Szyprowski
IOMMU core doesn't detach device from the default domain before calling ->iommu_remove_device, so check that and do the proper cleanup or warn if device is still attached to non-default domain. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iom

[PATCH v2 3/4] iommu/exynos: Ensure that SYSMMU is added only once to its master device

2017-01-09 Thread Marek Szyprowski
ensures that SYSMMU controller is added to its master device (owner) only once. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/

[PATCH v2 0/4] Fixes for Exynos IOMMU driver

2017-01-09 Thread Marek Szyprowski
Marek Szyprowski Samsung R Institute Poland Changelog: v2: - dropped "iommu/exynos: Add default_domain check in iommu_attach_device" patch, this is handled in iommu core - replaced BUG_ON with proper error propagation v1: http://www.spinics.net/lists/linux-samsung-soc/msg56354.html

Re: [PATCH 4/5] iommu/exynos: Add default_domain check in iommu_attach_device

2016-11-30 Thread Marek Szyprowski
Hi Joerg, On 2016-11-29 17:48, Joerg Roedel wrote: On Thu, Nov 24, 2016 at 12:20:19PM +0100, Marek Szyprowski wrote: This patch adds default_domain check before calling exynos_iommu_detach_device. This path was intended only to cope with default domains, which are automatically attached

Re: [PATCH 06/10] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2016-11-29 Thread Marek Szyprowski
Generic PCI functions exported to card drivers */ @@ -1604,7 +1604,7 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, #define dev_is_pf(d) (false) #define dev_num_vf(d) (0) -static inline void pci_dma_configure(struct device *dev) { } +static inline int pci_dma_c

[PATCH 4/5] iommu/exynos: Add default_domain check in iommu_attach_device

2016-11-24 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 426b1534d4d3..63d9358a6d9c 100644 --- a/drivers/iommu/

[PATCH 0/5] Fixes for Exynos IOMMU driver

2016-11-24 Thread Marek Szyprowski
are based on current iommu/next branch. Best regards Marek Szyprowski Samsung R Institute Poland Patch summary: Marek Szyprowski (5): iommu/exynos: Improve page fault debug message iommu/exynos: Fix warnings from DMA-debug iommu/exynos: Ensure that SYSMMU is added only once to its master

[PATCH 3/5] iommu/exynos: Ensure that SYSMMU is added only once to its master device

2016-11-24 Thread Marek Szyprowski
ensures that SYSMMU controller is added to its master device (owner) only once. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/

[PATCH 5/5] iommu/exynos: Properly release device from the default domain in ->remove

2016-11-24 Thread Marek Szyprowski
IOMMU core doesn't detach device from the default domain before calling ->iommu_remove_device, so check that and do the proper cleanup or warn if device is still attached to non-default domain. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iom

[PATCH 1/5] iommu/exynos: Improve page fault debug message

2016-11-24 Thread Marek Szyprowski
/developer not equipped with hardware debugging tools. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c

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

2016-11-17 Thread Marek Szyprowski
are cleared after EPROBEDEFER error, but on the next try dma_ops will still be set to old value, which is not right. Signed-off-by: Sricharan R <sricha...@codeaurora.org> Reviewed-by: Robin Murphy <robin.mur...@arm.com> Acked-by: Marek Szyprowski <m.szyprow...@samsung.com> ---

[PATCH] iommu/exynos: Fix warnings from DMA-debug

2016-11-15 Thread Marek Szyprowski
-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 30808e9..7b0bd86 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/

[PATCH v7 7/7] iommu/exynos: Use device dependency links to control runtime pm

2016-11-14 Thread Marek Szyprowski
at 5V (by 4.4%). The dependency links also enforce proper order of suspending/restoring devices during system sleep transition, so there is no more need to use LATE_SYSTEM_SLEEP_PM_OPS-based workaround for ensuring that SYSMMUs are suspended after their master devices. Signed-off-by: Marek

[PATCH v7 3/7] iommu/exynos: Simplify internal enable/disable functions

2016-11-14 Thread Marek Szyprowski
-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 104 --- 1 file changed, 29 insertions(+), 75 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4056228..f45b274 100644 --- a/drivers

[PATCH v7 4/7] iommu/exynos: Set master device once on boot

2016-11-14 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index f45b274..28e570b 100644 --- a/drivers/iommu/

[PATCH v7 2/7] iommu/exynos: Remove dead code

2016-11-14 Thread Marek Szyprowski
__sysmmu_enable/disable functions were designed to do ref-count based operations, but current code always calls them only once, so the code for checking the conditions and invalid conditions can be simply removed without any influence to the driver operation. Signed-off-by: Marek Szyprowski

[PATCH v7 1/7] iommu/exynos: Remove excessive, useless debug

2016-11-14 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

[PATCH v7 0/7] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-11-14 Thread Marek Szyprowski
9-iommu-pm-v7 Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v7: - change type of sysmmu->active to bool, as pointed by Joerg - extended commit message with measured power reduction value v6: - removed LATE_SYSTEM_SLEEP_PM_OPS-based workaround, because it is no longer

Re: [PATCH v4 2/2] iommu/exynos: Add proper runtime pm support

2016-11-09 Thread Marek Szyprowski
Hi Luis, On 2016-11-08 23:14, Luis R. Rodriguez wrote: On Mon, Oct 10, 2016 at 03:32:06PM +0200, Marek Szyprowski wrote: Hi Luis On 2016-10-06 19:37, Luis R. Rodriguez wrote: On Thu, Sep 29, 2016 at 10:12:31AM +0200, Marek Szyprowski wrote: This patch uses recently introduced device links

Re: [PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-08 Thread Marek Szyprowski
Hi Robin, On 2016-11-08 15:44, Robin Murphy wrote: On 08/11/16 13:41, Marek Szyprowski wrote: On 2016-11-08 12:37, Robin Murphy wrote: On 07/11/16 13:06, Marek Szyprowski wrote: When one called iommu_dma_init_domain() with size smaller than device's DMA mask, the alloc_iova

[PATCH v6 3/7] iommu/exynos: Simplify internal enable/disable functions

2016-11-08 Thread Marek Szyprowski
-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 104 --- 1 file changed, 29 insertions(+), 75 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4056228..f45b274 100644 --- a/drivers

[PATCH v6 6/7] iommu/exynos: Add runtime pm support

2016-11-08 Thread Marek Szyprowski
state consistency, additional lock for runtime pm transitions was introduced. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 45 +++- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/drivers

[PATCH v6 4/7] iommu/exynos: Set master device once on boot

2016-11-08 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index f45b274..28e570b 100644 --- a/drivers/iommu/

[PATCH v6 5/7] iommu/exynos: Rework and fix internal locking

2016-11-08 Thread Marek Szyprowski
This patch reworks locking in the exynos_iommu_attach/detach_device functions to ensure that all entries of the sysmmu_drvdata and exynos_iommu_owner structure are updated under the respective spinlocks, while runtime pm functions are called without any spinlocks held. Signed-off-by: Marek

[PATCH v6 0/7] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-11-08 Thread Marek Szyprowski
9-iommu-pm-v6 Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v6: - removed LATE_SYSTEM_SLEEP_PM_OPS-based workaround, because it is no longer needed after introducing device links (they also take care of proper system sleep suspend/resume sequence) - updated some comments

[PATCH v6 1/7] iommu/exynos: Remove excessive, useless debug

2016-11-08 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

Re: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm

2016-11-07 Thread Marek Szyprowski
Hi Luis, On 2016-11-07 22:47, Luis R. Rodriguez wrote: On Thu, Oct 20, 2016 at 09:22:53AM +0200, Marek Szyprowski wrote: This patch uses recently introduced device dependency links to track the runtime pm state of the master's device. This way each SYSMMU controller is set to runtime active

[PATCH] iommu/dma-iommu: properly respect configured address space size

2016-11-07 Thread Marek Szyprowski
ize parameter into account (if it is smaller than the device's dma_mask). Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/dma-iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iomm

[PATCH RESEND] iommu/exynos: Improve page fault debug message

2016-11-04 Thread Marek Szyprowski
/developer not equipped with hardware debugging tools. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 3

[PATCH] iommu/exynos: Add support for page access protection bits

2016-11-03 Thread Marek Szyprowski
. Exynos SYSMMU earlier than v5 doesn't support write-only mappings, so pages with such protection bits are mapped as read/write. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 63 +++- 1 file chang

Re: [PATCH 4/4] iommu/arm-smmu: Add the device_link between masters and smmu

2016-10-25 Thread Marek Szyprowski
ter's driver probing, what happens after applying your IOMMU deferred probe patchset. + return 0; out_free: Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundati

Re: [PATCH V3 0/8] IOMMU probe deferral support

2016-10-24 Thread Marek Szyprowski
to an domain in arch_teardown_dma_ops. But with iommu_groups created from the iommu driver, the device is always attached to a domain/default_domain. So so the WARN has to be removed/handled probably. Thanks for continuing work on this feature! Your can add my: Tested-by: Marek Szyprowski

Re: [PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm

2016-10-23 Thread Marek Szyprowski
or save its state instead of being activated all the time when attached to the given master device. This way SYSMMU controllers no longer prevents respective power domains to be turned off when master's device is not being used. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- d

Re: [PATCH v5 6/7] iommu/exynos: Add runtime pm support

2016-10-23 Thread Marek Szyprowski
ric pm_runtime_force_suspend/pm_runtime_force_resume helpers. To ensure internal state consistency, additional lock for runtime pm transitions was introduced. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 45 +++- 1 file ch

[PATCH v5 0/7] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-10-20 Thread Marek Szyprowski
/lists/arm-kernel/msg509600.html - initial version Patch summary: Marek Szyprowski (7): iommu/exynos: Remove excessive, useless debug iommu/exynos: Remove dead code iommu/exynos: Simplify internal enable/disable functions iommu/exynos: Set master device once on boot iommu/exynos: Rewo

[PATCH v5 7/7] iommu/exynos: Use device dependency links to control runtime pm

2016-10-20 Thread Marek Szyprowski
to the given master device. This way SYSMMU controllers no longer prevents respective power domains to be turned off when master's device is not being used. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 16 1 file chan

[PATCH v5 3/7] iommu/exynos: Simplify internal enable/disable functions

2016-10-20 Thread Marek Szyprowski
-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 104 --- 1 file changed, 29 insertions(+), 75 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4056228b8e5f..f45b274513cc

[PATCH v5 4/7] iommu/exynos: Set master device once on boot

2016-10-20 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index f45b274513cc..28e570b53672 100644 --- a/drivers

[PATCH v5 1/7] iommu/exynos: Remove excessive, useless debug

2016-10-20 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

[PATCH v5 5/7] iommu/exynos: Rework and fix internal locking

2016-10-20 Thread Marek Szyprowski
This patch reworks locking in the exynos_iommu_attach/detach_device functions to ensure that all entries of the sysmmu_drvdata and exynos_iommu_owner structure are updated under the respective spinlocks, while runtime pm functions are called without any spinlocks held. Signed-off-by: Marek

[PATCH v5 2/7] iommu/exynos: Remove dead code

2016-10-20 Thread Marek Szyprowski
__sysmmu_enable/disable functions were designed to do ref-count based operations, but current code always calls them only once, so the code for checking the conditions and invalid conditions can be simply removed without any influence to the driver operation. Signed-off-by: Marek Szyprowski

Re: [PATCH v4 2/2] iommu/exynos: Add proper runtime pm support

2016-10-10 Thread Marek Szyprowski
Hi Luis On 2016-10-06 19:37, Luis R. Rodriguez wrote: On Thu, Sep 29, 2016 at 10:12:31AM +0200, Marek Szyprowski wrote: This patch uses recently introduced device links to track the runtime pm state of the master's device. This way each SYSMMU controller is runtime activated when its master's

Re: [PATCH V3 0/8] IOMMU probe deferral support

2016-10-10 Thread Marek Szyprowski
. But with iommu_groups created from the iommu driver, the device is always attached to a domain/default_domain. So so the WARN has to be removed/handled probably. Thanks for continuing work on this feature! Your can add my: Tested-by: Marek Szyprowski <m.szyprow...@samsung.com> It works fine with Exynos

[PATCH v4 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-09-29 Thread Marek Szyprowski
v4.8-iommu-pm-v4 Patches are based on vanilla v4.8-rc8 kernel with Rafael's device dependencies v4 patchset applied. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v4: - rebased on top of v4 of device dependencies/links patchset, what resolved system hang on reboot

[PATCH v4 1/2] iommu/exynos: Remove excessive, useless debug

2016-09-29 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

[PATCH v4 2/2] iommu/exynos: Add proper runtime pm support

2016-09-29 Thread Marek Szyprowski
prevents respective power domains to be turned off when master's device is not used. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 225 ++- 1 file changed, 94 insertions(+), 131 deletions(-) diff

Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-09-26 Thread Marek Szyprowski
Hi Rafael, On 2016-09-24 03:25, Rafael J. Wysocki wrote: On Friday, September 23, 2016 03:50:02 PM Lukas Wunner wrote: On Fri, Sep 23, 2016 at 02:49:20PM +0200, Rafael J. Wysocki wrote: On Tuesday, September 20, 2016 10:51:13 AM Marek Szyprowski wrote: On 2016-09-19 23:45, Tobias Jakobi

Re: [PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-09-20 Thread Marek Szyprowski
I will register a bus notifier and create a link on consumers device probe then. [...] Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v7 22/22] iommu/dma: Avoid PCI host bridge windows

2016-09-15 Thread Marek Szyprowski
Hi Robin, On 2016-09-14 15:25, Robin Murphy wrote: On 14/09/16 13:35, Marek Szyprowski wrote: On 2016-09-14 13:10, Robin Murphy wrote: On 14/09/16 11:55, Marek Szyprowski wrote: On 2016-09-12 18:14, Robin Murphy wrote: With our DMA ops enabled for PCI devices, we should avoid allocating

[PATCH] iommu/exynos: Improve page fault debug message

2016-09-14 Thread Marek Szyprowski
/developer not equipped with hardware debugging tools. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 3

Re: [PATCH v7 22/22] iommu/dma: Avoid PCI host bridge windows

2016-09-14 Thread Marek Szyprowski
Hi Robin, On 2016-09-14 13:10, Robin Murphy wrote: On 14/09/16 11:55, Marek Szyprowski wrote: On 2016-09-12 18:14, Robin Murphy wrote: With our DMA ops enabled for PCI devices, we should avoid allocating IOVAs which a host bridge might misinterpret as peer-to-peer DMA and lead to faults

Re: [PATCH v7 22/22] iommu/dma: Avoid PCI host bridge windows

2016-09-14 Thread Marek Szyprowski
bridge's windows when initialising a DMA domain for a PCI device. CC: Marek Szyprowski <m.szyprow...@samsung.com> CC: Inki Dae <inki@samsung.com> Reported-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Robin Murphy <robin.mur...@arm.com> I d

Re: [PATCH v3 2/2] iommu/exynos: Add proper runtime pm support

2016-09-14 Thread Marek Szyprowski
h are used in the DMA mode. Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 2/2] iommu/exynos: Add proper runtime pm support

2016-09-14 Thread Marek Szyprowski
Hi Ulf, On 2016-09-13 16:20, Ulf Hansson wrote: On 13 September 2016 at 14:49, Marek Szyprowski <m.szyprow...@samsung.com> wrote: This patch uses recently introduced device links to track the runtime pm state of the master's device. This way each SYSMMU controller is runtime activated wh

[PATCH v3 2/2] iommu/exynos: Add proper runtime pm support

2016-09-13 Thread Marek Szyprowski
prevents respective power domains to be turned off when master's device is not used. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 225 ++- 1 file changed, 94 insertions(+), 131 deletions(-) diff

[PATCH v3 0/2] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-09-13 Thread Marek Szyprowski
nilla v4.8-rc6 kernel with Rafael's patches applied. Best regards Marek Szyprowski Samsung R Institute Poland Changelog: v3: - rebased on top of latest device dependencies/links patchset - added proper locking between runtime pm, iommu_attach/detach and sysmmu enable/disable(added per i

[PATCH v3 1/2] iommu/exynos: Remove excessive, useless debug

2016-09-13 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

Re: [PATCH 7/8] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2016-09-02 Thread Marek Szyprowski
t;, > of_node_full_name(np)); > } > diff --git a/drivers/of/device.c b/drivers/of/device.c > index e1fad50..92e02dc 100644 > --- a/drivers/of/device.c > +++ b/drivers/of/device.c > @@ -149,6 +149,8 @@ int of_dma_configure_ops(struct dev

Re: [PATCH 1/8] arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops()

2016-09-02 Thread Marek Szyprowski
d then before next probe ties dma_ops will be already set, but no iommu structures are available. For a convenience, this a fixup patch: https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/commitdiff/55adefd43cee9d4beb15cb1bbd805c5059b56b4f Best regards -- Marek Szyprowski, PhD Samsung

Re: [PATCH 7/8] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2016-09-02 Thread Marek Szyprowski
); nit: Would be good to add a blank line here for improved readability. ok, will add. Best regards -- Marek Szyprowski, PhD Samsung R Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 00/10] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-07-19 Thread Marek Szyprowski
Hi Tobias On 2016-07-18 18:43, Tobias Jakobi wrote: Marek Szyprowski wrote: On 2016-07-18 13:00, Tobias Jakobi wrote: Marek Szyprowski wrote: On 2016-07-15 15:21, Tobias Jakobi wrote: Tobias Jakobi wrote: Hello Marek, I've tested the patchset on 4.7-rc7 and noticed that it breaks reboot

Re: [PATCH v2 00/10] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-07-18 Thread Marek Szyprowski
Dear Tobias On 2016-07-18 13:00, Tobias Jakobi wrote: Marek Szyprowski wrote: On 2016-07-15 15:21, Tobias Jakobi wrote: Tobias Jakobi wrote: Hello Marek, I've tested the patchset on 4.7-rc7 and noticed that it breaks reboot on my ODROID-X2. Going to check where exactly things break

Re: [PATCH v2 00/10] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-07-18 Thread Marek Szyprowski
xynos: Add proper runtime pm support" I still have to check if forcing runpm status to 'on' makes a difference. I suspect that the aggressive clock gating might be the reason? Thanks for testing. I will check this issue. Could you send me your .config? Best regards -- Marek Szyprowski, PhD

Re: [PATCH -next] iommu/exynos: Fix return value check in exynos_iommu_of_setup()

2016-07-18 Thread Marek Szyprowski
e_create() failure will lead to NULL pointer exception, so I think it is appropriate to: Fixes: 8ed55c812fa8 ("iommu/exynos: Init from dt-specific callback instead of initcall") Cc: <sta...@vger.kernel.org> Thanks for spotting this issue. Acked-by: Marek Szyprowski <m.szyprow..

Re: [PATCH v3 2/9] iommu/of: Consolidate device creation workarounds

2016-07-01 Thread Marek Szyprowski
Hi Robin, On 2016-07-01 13:19, Robin Murphy wrote: Hi Marek, On 01/07/16 11:32, Marek Szyprowski wrote: Hi Robin, On 2016-06-28 17:48, Robin Murphy wrote: So far, all the users of the generic of_xlate configuration mechanism are resorting to explicit platform device creation to ensure

Re: [PATCH v3 2/9] iommu/of: Consolidate device creation workarounds

2016-07-01 Thread Marek Szyprowski
use if the IOMMU can't or won't exist to back them up. CC: Marek Szyprowski <m.szyprow...@samsung.com> CC: Yong Wu <yong...@mediatek.com> Signed-off-by: Robin Murphy <robin.mur...@arm.com> Frankly, I would avoid moving this workaround to the iommu core. IMHO the best soluti

Re: [RFC PATCH v2 03/15] arm64: mm: change IOMMU notifier action to attach DMA ops

2016-06-23 Thread Marek Szyprowski
Hi Lorenzo, On 2016-06-21 18:06, Lorenzo Pieralisi wrote: Hi Marek, On Tue, Jun 21, 2016 at 09:53:20AM +0200, Marek Szyprowski wrote: Hi Robin, On 2016-06-17 11:27, Robin Murphy wrote: Hi Lorenzo, I think this patch makes sense even independent of the rest of the series, one nit inline

Re: [RFC PATCH v2 03/15] arm64: mm: change IOMMU notifier action to attach DMA ops

2016-06-21 Thread Marek Szyprowski
to it. Best regards Marek Szyprowski, PhD Samsung R Institute Poland On 07/06/16 14:30, Lorenzo Pieralisi wrote: Current bus notifier in ARM64 (__iommu_attach_notifier) attempts to attach dma_ops to a device on BUS_NOTIFY_ADD_DEVICE action notification. This causes issues on ACPI based

[PATCH v2 05/10] PM core: Optimize the use of device links for runtime PM

2016-06-17 Thread Marek Szyprowski
simple mechanism to detect that case and possibly avoid the extra unnecessary overhead. Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/base/core.c | 6 ++ drive

[PATCH v2 07/10] driver core: Add support for links to already probed drivers

2016-06-17 Thread Marek Szyprowski
Set proper link state if link is created between already probed supplier device and to be probed consumer device. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/base/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/co

[PATCH v2 03/10] PM core: Make async suspend/resume of devices use device links

2016-06-17 Thread Marek Szyprowski
he idea, roughly, is to use dpm_wait() to wait for all consumers before a supplier device suspend and to wait for all suppliers before a consumer device resume. Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- dr

[PATCH v2 02/10] driver core: Functional dependencies tracking support

2016-06-17 Thread Marek Szyprowski
t ordering between the all of the supplier and consumer devices. Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/base/base.h| 11 ++ drivers/base/core.c| 386 +

[PATCH v2 06/10] driver core: Avoid endless recursion if device has more than one link

2016-06-17 Thread Marek Szyprowski
This patch fixes endless recursion, which happends when device has more than one link. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/base/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c

[PATCH v2 00/10] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-06-17 Thread Marek Szyprowski
expert, so please double check if my changes are really correct. This patchset requires my previous changes to Exynos IOMMU driver submitted in the "Exynos IOMMU: improve clock management" thread: http://www.spinics.net/lists/arm-kernel/msg505695.html Best regards Marek Szyprowski Samsun

[PATCH v2 10/10] iommu/exynos: Add proper runtime pm support

2016-06-17 Thread Marek Szyprowski
prevents respective power domains to be turned off when master's device is not used. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 218 --- 1 file changed, 99 insertions(+), 119 deletions(-) diff --git a/d

[PATCH v2 09/10] iommu/exynos: Remove excessive, useless debug

2016-06-17 Thread Marek Szyprowski
Remove excessive, useless debug about skipping TLB invalidation, which is a normal situation when more aggressive power management is enabled. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

[PATCH v2 04/10] PM core: Make runtime PM of devices use device links

2016-06-17 Thread Marek Szyprowski
M_RUNTIME, tells the core whether or not the link should be used for runtime PM at all. Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/base/core.c | 15 +++ drivers/base/dd.c

[PATCH v2 08/10] PM core: Fix restoring devices with links during system PM transition

2016-06-17 Thread Marek Szyprowski
runtime PM disabled, what results in incorrect runtime PM state during system wide PM transition. Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> --- drivers/base/power/runtime.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/base

<    1   2   3   4   5   6   7   8   9   >