Re: [PATCH] xhci: Set DMA parameters appropriately

2017-10-17 Thread Marek Szyprowski
Hi Robin, On 2017-10-13 12:48, Robin Murphy wrote: On 13/10/17 09:15, Marek Szyprowski wrote: On 2017-10-11 15:56, Robin Murphy wrote: xHCI requires that data buffers do not cross 64KB boundaries (and are thus at most 64KB long as well) - whilst xhci_queue_{bulk,isoc}_tx() already split their

Re: [PATCH] xhci: Set DMA parameters appropriately

2017-10-13 Thread Marek Szyprowski
ded, so there is very little value added by this patch. 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] iommu/exynos: Remove initconst attribute to avoid potential kernel oops

2017-10-10 Thread Marek Szyprowski
Hi Joerg, On 2017-10-10 14:13, Joerg Roedel wrote: On Mon, Oct 09, 2017 at 01:40:23PM +0200, Marek Szyprowski wrote: Exynos SYSMMU registers standard platform device with sysmmu_of_match table, what means that this table is accessed every time a new platform device is registered in a system

[PATCH] iommu/exynos: Remove initconst attribute to avoid potential kernel oops

2017-10-09 Thread Marek Szyprowski
caused by access to freed memory. Fixes: 6b21a5db3642 ("iommu/exynos: Support for device tree") Signed-off-by: Marek Szyprowski --- Hi! This issue was there from the beggining of the device tree support, I'm really surprised that it has not been noticed it till now. This patch fixe

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

2017-09-29 Thread Marek Szyprowski
arks, which show that those structures should 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&D Institute Poland ___

[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 --- drivers/iommu/exynos-iommu.c | 23 --- 1 file changed

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 Like I already said, its fine for me. Acked-by: Marek Szyprowski --- MAINTAINERS | 2 +- 1

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

2017-08-28 Thread Marek Szyprowski
Hi Arvind, On 2017-08-28 14:12, Arvind Yadav wrote: iommu_ops are not supposed to change at runtime. Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with const iommu_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-

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

2017-08-04 Thread Marek Szyprowski
ives us an opportunity to use standard platform device registration method also for Exynos SYSMMU controllers. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 36 +--- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/drivers/io

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&D In

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 wrote: On 2017-07-13 13:50, Rob Clark wrote: On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R wrote: On 7/13/2017 10:43 AM, Vivek Gautam wrote: On 07/13/2017 04:24 AM, Stephen Boyd wrote: On 07/06

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

2017-07-13 Thread Marek Szyprowski
ost 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&D Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lis

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-ma

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

2017-05-08 Thread Marek Szyprowski
ma-mapping.h | 12 include/linux/of_device.h | 10 ++- 18 files changed, 312 insertions(+), 322 deletions(-) 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

[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 --- drivers/iommu/exynos-iommu.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers

[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 --- drivers/iommu/exynos-iommu.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions

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

2017-03-20 Thread Marek Szyprowski
ned-off-by: Marek Szyprowski --- 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 --git a/drivers/iommu/exynos

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

2017-03-20 Thread Marek Szyprowski
d. 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 --- The menti

[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 --- drivers/iommu/iova.c | 85 +++- 1 file changed, 31

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 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 Cc: linux-arm-ker...@lists.infradead.org Cc: linux

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(&data->iommu, &pdev->dev, NULL, +"sysmmu.%pa", &ioaddr); Can we stick t

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 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 Cc: linux-arm-ker...@lists.infradead.org Cc: linux

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 Szyprows

[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 --- 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 b79e4c452b8b..058ee8425f35 100644

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

2017-01-09 Thread Marek Szyprowski
: Marek Szyprowski --- 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 +++ b/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 --- drivers/iommu/exynos-iommu.c | 12 1 file

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

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

2017-01-09 Thread Marek Szyprowski
Marek Szyprowski Samsung R&D 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.

Re: [PATCH] iommu: Drop the of_iommu_{set/get}_ops() interface

2017-01-09 Thread Marek Szyprowski
of_iommu_{set/get}_ops() remaining glue code in order to complete the interface rework. Signed-off-by: Lorenzo Pieralisi Cc: Matthias Brugger Cc: Will Deacon Cc: Robin Murphy Cc: Joerg Roedel Cc: Marek Szyprowski --- Exynos, msm and mtk code compile tested only owing to lack of test platform

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 by

Re: [PATCH v4 00/10] IOMMU probe deferral support

2016-11-30 Thread Marek Szyprowski
ter dereference (reported in reply to patch #6), it works fine on all those platforms! Please add (again) my: Tested-by: Marek Szyprowski [1] https://www.spinics.net/lists/linux-samsung-soc/msg56354.html Previous post of this series [5]. [V4] * Took the reworked patches [2] from Rob

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

2016-11-29 Thread Marek Szyprowski
_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_configure(struct device *dev) { return 0; } #endif /* CONFIG_PCI */ 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 4/5] iommu/exynos: Add default_domain check in iommu_attach_device

2016-11-24 Thread Marek Szyprowski
Hi Robin, On 2016-11-24 13:25, Robin Murphy wrote: Hi Marek, On 24/11/16 11:20, 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 by the iommu core

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

2016-11-24 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- 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/exynos-iommu.c +++ b/drivers/iommu

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

[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&D 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 ma

[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 --- drivers/iommu/exynos-iommu.c | 12 1 file

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

2016-11-24 Thread Marek Szyprowski
: Marek Szyprowski --- 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 ac726e1760de..e7851cffbbee 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -744,6

[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 --- 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 57ba0d3091ea..ac726e1760de 100644

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

2016-11-21 Thread Marek Szyprowski
Hi Lukas, On 2016-11-19 12:11, Lukas Wunner wrote: On Tue, Nov 08, 2016 at 08:27:12AM +0100, Marek Szyprowski wrote: On 2016-11-07 22:47, Luis R. Rodriguez wrote: If so why? If this issue is present also on systems that only use ACPI is this possibly due to an ACPI firmware bug or the lack

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

2016-11-17 Thread Marek Szyprowski
s 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 Reviewed-by: Robin Murphy Acked-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/m

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

2016-11-15 Thread Marek Szyprowski
: Marek Szyprowski --- 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/exynos-iommu.c @@ -763,6 +763,7

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

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

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

2016-11-14 Thread Marek Szyprowski
consuption from 136mA to 130mA 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

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

2016-11-14 Thread Marek Szyprowski
: Marek Szyprowski --- 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/iommu/exynos-iommu.c +++ b

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

2016-11-14 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- 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/exynos-iommu.c +++ b/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 5/7] iommu/exynos: Rework and fix internal locking

2016-11-14 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 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 --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

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

2016-11-14 Thread Marek Szyprowski
szyprowski/linux-srpol.git v4.9-iommu-pm-v7 Best regards Marek Szyprowski Samsung R&D 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 wor

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() wil

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

2016-11-08 Thread Marek Szyprowski
Hi Robin, 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() will not respect it and always assume that all IOVA addresses will be allocated from the the

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

2016-11-08 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 v6 7/7] iommu/exynos: Use device dependency links to control runtime pm

2016-11-08 Thread Marek Szyprowski
ound for ensuring that SYSMMUs are suspended after their master devices. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index

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

2016-11-08 Thread Marek Szyprowski
: Marek Szyprowski --- 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/iommu/exynos-iommu.c +++ b

[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 --- drivers/iommu/exynos-iommu.c | 45 +++- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers

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

2016-11-08 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- 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/exynos-iommu.c +++ b/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
szyprowski/linux-srpol.git v4.9-iommu-pm-v6 Best regards Marek Szyprowski Samsung R&D 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/

[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 --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

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 a

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

2016-11-07 Thread Marek Szyprowski
ace size parameter into account (if it is smaller than the device's dma_mask). Signed-off-by: Marek Szyprowski --- 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-iommu.c index c5ab8667e6f2..8b4b72

[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 --- 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 30808e9..47f0d67 100644 --- a

[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 --- drivers/iommu/exynos-iommu.c | 63 +++- 1 file changed, 51 insertions(+), 12 dele

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

2016-10-25 Thread Marek Szyprowski
g, what happens after applying your IOMMU deferred probe patchset. + return 0; out_free: Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.li

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

2016-10-24 Thread Marek Szyprowski
r 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 --- drivers/iommu/exyn

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

2016-10-23 Thread Marek Szyprowski
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
restore 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 --- drivers/iommu/exyn

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 --- drivers/iommu/exynos-iommu.c | 45 +++- 1 file changed, 36 insertions(+), 9 deleti

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

2016-10-20 Thread Marek Szyprowski
state consistency, additional lock for runtime pm transitions was introduced. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 45 +++- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers

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

2016-10-20 Thread Marek Szyprowski
ysocki v1: http://www.spinics.net/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

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

2016-10-20 Thread Marek Szyprowski
n 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 --- drivers/iommu/exynos-iommu.c | 16 1 file changed, 8 insertions(

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

2016-10-20 Thread Marek Szyprowski
: Marek Szyprowski --- 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 100644 --- a/drivers/iommu/exynos-iommu.c

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

2016-10-20 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- 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/iommu/exynos-iommu.c +++ b/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 --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

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

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

2016-10-10 Thread Marek Szyprowski
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 It works fine with Exynos SYSMMU driver, although a patch

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

2016-09-29 Thread Marek Szyprowski
ski/linux-srpol.git 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&D Institute Poland Changelog: v4: - rebased on top of v4 of device dependencies/links patchset, what res

[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 --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

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

2016-09-29 Thread Marek Szyprowski
no longer prevents respective power domains to be turned off when master's device is not used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 225 ++- 1 file changed, 94 insertions(+), 131 deletions(-) diff --git a/drivers/iommu/e

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
nks can be created only to a device, which has been fully added to the system, I will register a bus notifier and create a link on consumers device probe then. [...] Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland _

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 --- 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 30808e9..47f0d67 100644 --- a

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 CC: Inki Dae Reported-by: Lorenzo Pieralisi Signed-off-by: Robin Murphy I don't know much about PCI and their IOMMU integration, but can't we use the direct mapping region feature of iommu cor

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

2016-09-14 Thread Marek Szyprowski
rmation about additional lines between DMA controller and UART module, which are used in the DMA mode. 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 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 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 device

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

2016-09-13 Thread Marek Szyprowski
no longer prevents respective power domains to be turned off when master's device is not used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 225 ++- 1 file changed, 94 insertions(+), 131 deletions(-) diff --git a/drivers/iommu/e

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

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

[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 --- drivers/iommu/exynos-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

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

2016-09-02 Thread Marek Szyprowski
ndex e1fad50..92e02dc 100644 > --- a/drivers/of/device.c > +++ b/drivers/of/device.c > @@ -149,6 +149,8 @@ int of_dma_configure_ops(struct device *dev, struct device_node *np) > coherent ? " " : " not "); > > iommu = of_iommu_configure(dev, np); &

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

2016-09-02 Thread Marek Szyprowski
vailable. 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 R&D Institute Poland ___ iomm

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

2016-09-02 Thread Marek Szyprowski
return PTR_ERR(iommu); nit: Would be good to add a blank line here for improved readability. ok, will add. 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 v2 00/10] Exynos IOMMU: proper runtime PM support (use device dependencies)

2016-07-18 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 r

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

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