Re: [PATCH] iommu/exynos: Remove driver

2014-03-09 Thread Tomasz Figa
Hi KyongHo, On 09.03.2014 14:54, KyongHo Cho wrote: On Thu, Mar 6, 2014 at 8:48 AM, Kyungmin Park kmp...@infradead.org wrote: On Fri, Feb 14, 2014 at 9:17 AM, Cho KyongHo pullip@samsung.com wrote: -Original Message- From: Olof Johansson [mailto:o...@lixom.net] Sent: Friday,

Re: [PATCH v11 12/27] ARM: dts: Add description of System MMU of Exynos SoCs

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:06, Cho KyongHo wrote: This patch adds dts entries for the System MMU devices found on Exynos4 and Exynos5 SoC series and the System MMU binding documentation. CC: Rob Herring robherri...@gmail.com CC: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Cho

Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:08, Cho KyongHo wrote: Runtime power management by exynos-iommu driver independently from master H/W's runtime pm is not useful for power saving since attaching master H/W in probing time turns on its local power endlessly. Thus this removes runtime pm API calls.

Re: [PATCH v11 08/27] iommu/exynos: always use a single clock descriptor

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:05, Cho KyongHo wrote: System MMU driver is changed to control only a single instance of System MMU at a time. Since a single instance of System MMU has only a single clock descriptor for its clock gating, there is no need to obtain two or more clock descriptors.

Re: [PATCH v11 10/27] iommu/exynos: use managed device helper functions

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:05, Cho KyongHo wrote: This patch uses managed device helper functions in the probe(). Signed-off-by: Cho KyongHo pullip@samsung.com --- drivers/iommu/exynos-iommu.c | 64 +- 1 file changed, 26 insertions(+), 38

Re: [PATCH v11 13/27] iommu/exynos: support for device tree

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:09, Cho KyongHo wrote: This commit adds device tree support for System MMU. Signed-off-by: Cho KyongHo pullip@samsung.com --- drivers/iommu/Kconfig|5 ++--- drivers/iommu/exynos-iommu.c | 21 + 2 files changed, 19

Re: [PATCH v11 15/27] iommu/exynos: use convenient macro to handle gate clocks

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:09, Cho KyongHo wrote: exynos-iommu driver must care about master H/W's gate clock as well as System MMU's gate clock. To enhance readability of the source code, macros to gate/ungate those clocks are defined. Signed-off-by: Cho KyongHo pullip@samsung.com ---

Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:10, Cho KyongHo wrote: Some master device descriptor like fimc-is which is an abstraction of very complex H/W may have multiple System MMUs. For those devices, the design of the link between System MMU and its master H/W is needed to be reconsidered. A link

Re: [PATCH v11 15/27] iommu/exynos: use convenient macro to handle gate clocks

2014-03-18 Thread Tomasz Figa
On 18.03.2014 12:18, Sachin Kamat wrote: On 18 March 2014 16:33, Cho KyongHo pullip@samsung.com wrote: On Fri, 14 Mar 2014 22:27:59 +0530, Sachin Kamat wrote: Hi KyongHo, On 14 March 2014 19:13, Tomasz Figa t.f...@samsung.com wrote: Hi KyongHo, On 14.03.2014 06:09, Cho KyongHo wrote

Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-18 Thread Tomasz Figa
On 18.03.2014 14:01, Cho KyongHo wrote: On Fri, 14 Mar 2014 17:12:03 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:10, Cho KyongHo wrote: Some master device descriptor like fimc-is which is an abstraction of very complex H/W may have multiple System MMUs. For those devices

Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions

2014-03-18 Thread Tomasz Figa
On 18.03.2014 10:56, Cho KyongHo wrote: On Fri, 14 Mar 2014 13:59:00 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:08, Cho KyongHo wrote: [snip] -static bool __exynos_sysmmu_disable(struct sysmmu_drvdata *data) +static void __sysmmu_disable_nocount(struct sysmmu_drvdata *data

Re: [PATCH v11 10/27] iommu/exynos: use managed device helper functions

2014-03-18 Thread Tomasz Figa
On 18.03.2014 11:38, Cho KyongHo wrote: On Fri, 14 Mar 2014 14:28:36 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:05, Cho KyongHo wrote: This patch uses managed device helper functions in the probe(). Signed-off-by: Cho KyongHo pullip@samsung.com --- drivers/iommu/exynos

Re: [PATCH v11 10/27] iommu/exynos: use managed device helper functions

2014-03-18 Thread Tomasz Figa
On 18.03.2014 12:09, Cho KyongHo wrote: On Fri, 14 Mar 2014 20:52:43 +0530, Sachin Kamat wrote: Hi KyongHo, On 14 March 2014 10:35, Cho KyongHo pullip@samsung.com wrote: This patch uses managed device helper functions in the probe(). Signed-off-by: Cho KyongHo pullip@samsung.com ---

Re: [PATCH v11 13/27] iommu/exynos: support for device tree

2014-03-18 Thread Tomasz Figa
On 18.03.2014 11:52, Cho KyongHo wrote: On Fri, 14 Mar 2014 14:39:33 +0100, Tomasz Figa wrote: @@ -557,11 +558,23 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) return 0; } -static struct platform_driver exynos_sysmmu_driver = { - .probe

Re: [PATCH v11 19/27] iommu/exynos: add support for power management subsystems.

2014-03-18 Thread Tomasz Figa
On 18.03.2014 12:23, Cho KyongHo wrote: On Fri, 14 Mar 2014 17:07:53 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:10, Cho KyongHo wrote: [snip] @@ -677,11 +679,40 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, data

Re: [PATCH v11 10/27] iommu/exynos: use managed device helper functions

2014-03-19 Thread Tomasz Figa
On 19.03.2014 10:01, Sachin Kamat wrote: On 19 March 2014 14:29, Cho KyongHo pullip@samsung.com wrote: On Tue, 18 Mar 2014 16:14:53 +0100, Tomasz Figa wrote: On 18.03.2014 12:09, Cho KyongHo wrote: On Fri, 14 Mar 2014 20:52:43 +0530, Sachin Kamat wrote: Hi KyongHo, On 14 March 2014 10

Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions

2014-03-19 Thread Tomasz Figa
On 19.03.2014 02:03, Cho KyongHo wrote: On Tue, 18 Mar 2014 16:09:50 +0100, Tomasz Figa wrote: On 18.03.2014 10:56, Cho KyongHo wrote: On Fri, 14 Mar 2014 13:59:00 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:08, Cho KyongHo wrote: [snip] @@ -637,11 +708,14 @@ static void

Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-19 Thread Tomasz Figa
On 19.03.2014 01:39, Cho KyongHo wrote: On Tue, 18 Mar 2014 15:26:48 +0100, Tomasz Figa wrote: On 18.03.2014 14:01, Cho KyongHo wrote: On Fri, 14 Mar 2014 17:12:03 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:10, Cho KyongHo wrote: Some master device descriptor like fimc

Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-19 Thread Tomasz Figa
On 19.03.2014 14:20, Tomasz Figa wrote: On 19.03.2014 01:39, Cho KyongHo wrote: On Tue, 18 Mar 2014 15:26:48 +0100, Tomasz Figa wrote: On 18.03.2014 14:01, Cho KyongHo wrote: On Fri, 14 Mar 2014 17:12:03 +0100, Tomasz Figa wrote: Hi KyongHo, On 14.03.2014 06:10, Cho KyongHo wrote: Some

Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions

2014-03-19 Thread Tomasz Figa
Hi Grant, On 19.03.2014 18:03, Grant Grundler wrote: On Wed, Mar 19, 2014 at 6:12 AM, Tomasz Figa t.f...@samsung.com wrote: ... No. Proper Linux drivers must support deferred probing mechanism and there should be no assumptions about probing orders. Using other initcall level than

Re: [PATCH v11 17/27] iommu/exynos: remove calls to Runtime PM API functions

2014-03-19 Thread Tomasz Figa
On 19.03.2014 19:37, Grant Grundler wrote: On Wed, Mar 19, 2014 at 10:30 AM, Tomasz Figa t.f...@samsung.com wrote: ... As I said, AFAIK the trend is to get rid of ordering by initcalls and make sure that drivers can handle missing dependencies properly, even for services such as DMA, GPIO

Re: [PATCH v11 10/27] iommu/exynos: use managed device helper functions

2014-03-20 Thread Tomasz Figa
On 20.03.2014 11:03, Cho KyongHo wrote: On Wed, 19 Mar 2014 13:08:42 +0100, Tomasz Figa wrote: On 19.03.2014 10:01, Sachin Kamat wrote: On 19 March 2014 14:29, Cho KyongHo pullip@samsung.com wrote: On Tue, 18 Mar 2014 16:14:53 +0100, Tomasz Figa wrote: On 18.03.2014 12:09, Cho KyongHo

Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-20 Thread Tomasz Figa
On 20.03.2014 11:22, Cho KyongHo wrote: On Wed, 19 Mar 2014 16:14:57 +0100, Tomasz Figa wrote: On 19.03.2014 14:20, Tomasz Figa wrote: On 19.03.2014 01:39, Cho KyongHo wrote: On Tue, 18 Mar 2014 15:26:48 +0100, Tomasz Figa wrote: On 18.03.2014 14:01, Cho KyongHo wrote: On Fri, 14 Mar 2014

Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-21 Thread Tomasz Figa
On 21.03.2014 06:21, Cho KyongHo wrote: On Thu, 20 Mar 2014 11:54:58 +0100, Tomasz Figa wrote: On 20.03.2014 11:22, Cho KyongHo wrote: On Wed, 19 Mar 2014 16:14:57 +0100, Tomasz Figa wrote: On 19.03.2014 14:20, Tomasz Figa wrote: On 19.03.2014 01:39, Cho KyongHo wrote: On Tue, 18 Mar 2014

Re: [PATCH v12 18/31] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-05-06 Thread Tomasz Figa
On 27.04.2014 09:37, Shaik Ameer Basha wrote: From: Cho KyongHo pullip@samsung.com Some master device descriptor like fimc-is which is an abstraction of very complex H/W may have multiple System MMUs. For those devices, the design of the link between System MMU and its master H/W is needed

Re: [PATCH v12 00/31] iommu/exynos: Fixes and Enhancements of System MMU driver with DT

2014-05-06 Thread Tomasz Figa
On 06.05.2014 19:59, Joerg Roedel wrote: On Wed, Apr 30, 2014 at 04:27:10PM +0530, Shaik Ameer Basha wrote: This series is going on for quite a long time and most of the patches here doesn't depend on dt bindings. As Exynos IOMMU h/w is introducing new versions very frequently, maintaining and

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

2014-08-18 Thread Tomasz Figa
m.szyprow...@samsung.com --- drivers/clk/samsung/clk-exynos4.c | 1 + include/dt-bindings/clock/exynos4.h | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) Acked-by: Tomasz Figa t.f...@samsung.com Best regards, Tomasz ___ iommu

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

2014-09-22 Thread Tomasz Figa
m.szyprow...@samsung.com Acked-by: Tomasz Figa t.f...@samsung.com --- drivers/clk/samsung/clk-exynos4.c | 1 + include/dt-bindings/clock/exynos4.h | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) Applied for next. Best regards, Tomasz

[RFC PATCH 0/2] Fix rockchip IOMMU driver vs PM issues

2014-12-11 Thread Tomasz Figa
notifications Tomasz Figa (1): iommu: rockchip: Handle system-wide and runtime PM Documentation/power/notifiers.txt | 14 +++ drivers/base/power/domain.c | 50 + drivers/iommu/rockchip-iommu.c| 208 +++--- include/linux/pm_domain.h | 20 4

[RFC PATCH 1/2] pm: Add PM domain notifications

2014-12-11 Thread Tomasz Figa
-by: Sylwester Nawrocki s.nawro...@samsung.com [tf...@chromium.org: rebased] Signed-off-by: Tomasz Figa tf...@chromium.org --- Documentation/power/notifiers.txt | 14 +++ drivers/base/power/domain.c | 50 +++ include/linux/pm_domain.h | 20

Re: [RFC PATCH 1/2] pm: Add PM domain notifications

2014-12-11 Thread Tomasz Figa
Hi Sylwester, On Thu, Dec 11, 2014 at 7:36 PM, Sylwester Nawrocki s.nawro...@samsung.com wrote: Hi Tomasz, On 11/12/14 09:26, Tomasz Figa wrote: From: Sylwester Nawrocki s.nawro...@samsung.com This patch adds notifiers to the runtime PM/genpd subsystem. It is now possible to register

[RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
uses power domain notifications to perform necessary IOMMU initialization. Race with runtime PM core is avoided by protecting code accessing the hardware, including startup and shutdown functions, with a spinlock with a check for power state inside. Signed-off-by: Tomasz Figa tf...@chromium.org

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
Hi Ulf, On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 11 December 2014 at 09:26, Tomasz Figa tf...@chromium.org wrote: This patch modifies the rockchip-iommu driver to consider state of the power domain the IOMMU is located in. When the power domain is powered

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
Hi Rafael, On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: On 11 December 2014 at 16:31, Kevin Hilman khil...@kernel.org wrote: [+ Laurent Pinchart] Tomasz Figa tf...@chromium.org writes: On Thu

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-14 Thread Tomasz Figa
On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hello, On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: On 11 December

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Tomasz Figa
On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Tomasz, On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: On Fri, Dec 12, 2014

Re: [PATCH v2 1/7] iommu/rockchip: fix devm_{request, free}_irq parameter

2016-06-09 Thread Tomasz Figa
gs clear. > > Signed-off-by: Simon Xue <x...@rock-chips.com> > Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> > --- > drivers/iommu/rockchip-iommu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-b

Re: [PATCH v2 2/7] iommu/rockchip: add map_sg callback for rk_iommu_ops

2016-06-09 Thread Tomasz Figa
_map_sg() to rockchip iommu accordingly. > > Signed-off-by: Simon Xue <x...@rock-chips.com> > Signed-off-by: Shunqian Zheng <x...@rock-chips.com> > --- > drivers/iommu/rockchip-iommu.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-b

Re: [PATCH v2 3/7] iommu/rockchip: support virtual iommu slave device

2016-06-10 Thread Tomasz Figa
Hi, On Wed, Jun 8, 2016 at 10:26 PM, Shunqian Zheng wrote: > An virtual master device like DRM need to attach to iommu > domain to share the domain with VOP(the one with actual > iommu slave). We currently check the group is NULL to indicate > a virtual master, which is

Re: [PATCH v2 4/7] ARM: dts: rockchip: add virtual iommu for display

2016-06-10 Thread Tomasz Figa
Hi, On Wed, Jun 8, 2016 at 10:26 PM, Shunqian Zheng wrote: > An virtual iommu without reg or interrupts for display. > Adding this according to iommu driver changes. > > Signed-off-by: Shunqian Zheng > --- > arch/arm/boot/dts/rk3288.dtsi | 6

Re: [PATCH v2 7/7] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-06-10 Thread Tomasz Figa
| 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Assuming that the above is fixed: Reviewed-by: Tomasz Figa <tf...@chromium.org> Best regards, Tomasz ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 5/7] drm: rockchip: use common iommu api to attach iommu

2016-06-10 Thread Tomasz Figa
Hi, On Wed, Jun 8, 2016 at 10:26 PM, Shunqian Zheng wrote: > Rockchip DRM used the arm special API, arm_iommu_*(), to attach > iommu for ARM32 SoCs. This patch convert to common iommu API > so it would support ARM64 like RK3399. > > The general idea is domain_alloc(),

Re: [PATCH v3 3/6] iommu/rockchip: support virtual iommu slave device

2016-06-15 Thread Tomasz Figa
gistering virtual iommu in DTS, this patch > creates a iommu when attaching. > > Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> > Suggested-by: Tomasz Figa <tf...@chromium.org> To clarify, I don't really like the idea of virtual IOMMU, however it is registered, dt

Re: [PATCH v4 0/8] iommu/rockchip: Fix bugs and enable on ARM64

2016-06-21 Thread Tomasz Figa
Hi Joerg, On Tue, Jun 21, 2016 at 6:17 PM, Joerg Roedel <j...@8bytes.org> wrote: > > On Tue, Jun 21, 2016 at 01:34:33PM +0900, Tomasz Figa wrote: > > This series intends mostly to enable support for ARM64 architecture > > in the rockchip-iommu driver. On the way to d

[PATCH v4 5/8] iommu/rockchip: Prepare to support generic DMA mapping

2016-06-20 Thread Tomasz Figa
From: Shunqian Zheng <zhen...@rock-chips.com> Set geometry for allocated domains and fix .domain_alloc() callback to work with IOMMU_DOMAIN_DMA domain type, which is used for implicit domains on ARM64. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tom

[PATCH v4 4/8] iommu/rockchip: Use DMA API to manage coherency

2016-06-20 Thread Tomasz Figa
d some device. To overcome this, a simple platform device is registered for each allocated IOMMU domain. With this patch, this driver can be used on both ARM and ARM64 platforms, such as RK3288 and RK3399 respectively. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tom

[PATCH v4 6/8] drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain

2016-06-20 Thread Tomasz Figa
not introduce any functional changes until the driver is made to attach subdevices into an IOMMU domain with the generic IOMMU API, which will happen in following patch. Based heavily on GEM implementation of Tegra DRM driver. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/g

[PATCH v4 8/8] iommu/rockchip: Enable Rockchip IOMMU on ARM64

2016-06-20 Thread Tomasz Figa
ips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index ad08603..5572621 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@

[PATCH v4 3/8] iommu/rockchip: Fix allocation of bases array in driver probe

2016-06-20 Thread Tomasz Figa
"iommu/rockchip: Reconstruct to support multi slaves") Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/rockchip-iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH v4 2/8] iommu/rockchip: Add map_sg callback for rk_iommu_ops

2016-06-20 Thread Tomasz Figa
ian Zheng <x...@rock-chips.com> Reviewed-on: https://chromium-review.googlesource.com/346326 Reviewed-by: Douglas Anderson <diand...@chromium.org> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/rockchip-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PATCH v4 0/8] iommu/rockchip: Fix bugs and enable on ARM64

2016-06-20 Thread Tomasz Figa
for rk_iommu_ops iommu/rockchip: Enable Rockchip IOMMU on ARM64 Tomasz Figa (1): drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 100 ++-- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 3 + drivers/gpu/drm/rockchip

[PATCH v4 1/8] iommu/rockchip: Fix devm_{request,free}_irq parameter

2016-06-20 Thread Tomasz Figa
clear. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Reviewed-on: https://chromium-review.googlesource.com/346325 Reviewed-by: Douglas Anderson <diand...@chromium.org> Signed-off-by: Tomasz Figa <tf...@chromium.org&g

Re: [PATCH v2 2/2] iommu/dma: Use __GFP_NOWARN only for high-order allocations

2017-07-26 Thread Tomasz Figa
Hi Joerg, On Wed, Jul 26, 2017 at 6:24 PM, Joerg Roedel <j...@8bytes.org> wrote: > On Tue, Jul 04, 2017 at 10:55:56PM +0900, Tomasz Figa wrote: >> diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c >> index bf23989b5158..6ed8c8f941d8 100644 >> ---

Re: [PATCH v2 1/2] iommu/dma: Respect __GFP_DMA and __GFP_DMA32 in incoming GFP flags

2017-07-26 Thread Tomasz Figa
Hi Joerg, On Wed, Jul 26, 2017 at 6:15 PM, Joerg Roedel <j...@8bytes.org> wrote: > On Tue, Jul 04, 2017 at 10:55:55PM +0900, Tomasz Figa wrote: >> Current implementation of __iommu_dma_alloc_pages() keeps adding >> __GFP_HIGHMEM to GFP flags regardless of whether other zone

Re: [PATCH v3 03/12] intel-ipu3: Add DMA API implementation

2017-07-26 Thread Tomasz Figa
On Fri, Jul 21, 2017 at 7:09 AM, Sakari Ailus <sakari.ai...@iki.fi> wrote: > Hi Arnd, > > On Wed, Jul 19, 2017 at 09:24:41AM +0200, Arnd Bergmann wrote: >> On Wed, Jul 19, 2017 at 5:12 AM, Yong Zhi <yong@intel.com> wrote: >> > From: Tomasz Figa <tf...@

[PATCH v2 1/2] iommu/dma: Respect __GFP_DMA and __GFP_DMA32 in incoming GFP flags

2017-07-04 Thread Tomasz Figa
combination. Fix this by checking for __GFP_DMA and __GFP_DMA32 in incoming GFP flags and adding __GFP_HIGHMEM only if they are not present. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/dma-iommu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) Changes f

[PATCH v2 2/2] iommu/dma: Use __GFP_NOWARN only for high-order allocations

2017-07-04 Thread Tomasz Figa
attempts, which are not critical. Signed-off-by: Tomasz Figa <tf...@chromium.org> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/dma-iommu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Changes from v1: - Fix typo in subject. - Add Robin's Reviewed-by.

[RFC PATCH 4/5] iommu/dma: Export non-static functions to use in modules

2017-07-05 Thread Tomasz Figa
-static functions in the file, so that loadable modules can benefit from them. Use EXPORT_SYMBOL() for consistency with other exports in the file. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/dma-iommu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/d

[RFC PATCH 0/5] Fixes for loadable modules implementing DMA/IOMMU APIs

2017-07-05 Thread Tomasz Figa
fetch https://chromium.googlesource.com/chromiumos/third_party/kernel refs/changes/26/548626/4 git checkout FETCH_HEAD The above is based on ChromeOS 4.4 kernel branch and has been used for testing this series with code using it on real devices. Tomasz Figa (5): base: dma-mapping: Export

[RFC PATCH 2/5] base: dma-mapping: Provide a function to look up remapped pages

2017-07-05 Thread Tomasz Figa
previously remapped. It hides implementation details, can do more sanity checks than find_vm_area() and can be exported for use in loadable modules. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/base/dma-mapping.c | 15 +++ include/linux/dma-mapping.h | 2 ++ 2

[RFC PATCH 5/5] iommu/dma: Add iommu_dma_cleanup()

2017-07-05 Thread Tomasz Figa
In case of loadable modules using dma-iommu helpers, it makes sense to drop the reference to the iova cache on module exit. Add a helper called iommu_dma_cleanup() that undoes the effects of iommu_dma_init(), so that modules can be unloaded cleanly. Signed-off-by: Tomasz Figa <tf...@chromium.

[RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-05 Thread Tomasz Figa
the remaining non-static functions in the file, so that loadable modules can benefit from them. Use EXPORT_SYMBOL() for consistency with other exports in the file. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/base/dma-mapping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver

[RFC PATCH 3/5] iommu: Export non-static functions to use in modules

2017-07-05 Thread Tomasz Figa
There are some non-static functions potentially useful in IOMMU drivers that do not have their symbols exported. Export them too, so that loadable modules can benefit from them. Use EXPORT_SYMBOL_GPL() for consistency with other exports in the file. Signed-off-by: Tomasz Figa <tf...@chromium.

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 5:26 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jul 6, 2017 at 3:44 AM, Tomasz Figa <tf...@chromium.org> wrote: >> On Thu, Jul 6, 2017 at 2:20 AM, Christoph Hellwig <h...@lst.de> wrote: >>> On Thu, Jul 06, 2017 at 12:22:35AM +0900,

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 5:34 PM, Tomasz Figa <tf...@chromium.org> wrote: > On Thu, Jul 6, 2017 at 5:26 PM, Arnd Bergmann <a...@arndb.de> wrote: >> On Thu, Jul 6, 2017 at 3:44 AM, Tomasz Figa <tf...@chromium.org> wrote: >>> On Thu, Jul 6, 2017 at 2:20 AM, C

Re: [RFC PATCH 4/5] iommu/dma: Export non-static functions to use in modules

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 11:17 PM, Tomasz Figa <tf...@chromium.org> wrote: > On Thu, Jul 6, 2017 at 11:10 PM, Christoph Hellwig <h...@lst.de> wrote: >> On Thu, Jul 06, 2017 at 12:09:45PM +0100, Robin Murphy wrote: >>> I suppose another option is to just make th

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 9:23 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jul 6, 2017 at 10:36 AM, Tomasz Figa <tf...@chromium.org> wrote: >> On Thu, Jul 6, 2017 at 5:34 PM, Tomasz Figa <tf...@chromium.org> wrote: >>> On Thu, Jul 6, 2017 at 5:26 PM,

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 11:02 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jul 6, 2017 at 3:49 PM, Tomasz Figa <tf...@chromium.org> wrote: >> On Thu, Jul 6, 2017 at 10:31 PM, Tomasz Figa <tf...@chromium.org> wrote: > >>> On the other hand, if it's st

Re: [RFC PATCH 4/5] iommu/dma: Export non-static functions to use in modules

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 11:10 PM, Christoph Hellwig wrote: > On Thu, Jul 06, 2017 at 12:09:45PM +0100, Robin Murphy wrote: >> I suppose another option is to just make the IOMMU and DMA ops a >> self-contained non-modular driver mirroring the VT-d/AMD-Vi IOMMUs - >> AFAICS it shouldn't

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 11:27 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jul 6, 2017 at 4:06 PM, Tomasz Figa <tf...@chromium.org> wrote: >> On Thu, Jul 6, 2017 at 11:02 PM, Arnd Bergmann <a...@arndb.de> wrote: >>> On Thu, Jul 6, 2017 at 3:49 PM, To

Re: [RFC PATCH 4/5] iommu/dma: Export non-static functions to use in modules

2017-07-06 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 11:35 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Thu, Jul 6, 2017 at 4:24 PM, Tomasz Figa <tf...@chromium.org> wrote: >> On Thu, Jul 6, 2017 at 11:17 PM, Tomasz Figa <tf...@chromium.org> wrote: >>> On Thu, Jul 6, 2017 at 11:10 PM, C

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-05 Thread Tomasz Figa
T_SYMBOL_GPL(), but was misled by existing EXPORT_SYMBOL()s in the file. Will fix. > > On Wed, Jul 05, 2017 at 04:12:11PM +0900, Tomasz Figa wrote: >> There is nothing wrong in having a loadable module implementing DMA API, >> for example to be used for sub-devices registered b

Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols

2017-07-05 Thread Tomasz Figa
On Thu, Jul 6, 2017 at 2:20 AM, Christoph Hellwig <h...@lst.de> wrote: > On Thu, Jul 06, 2017 at 12:22:35AM +0900, Tomasz Figa wrote: >> Generally the user is a work in progress that should be posted in a >> very near future. You can find a reference to our downstream tr

Re: [PATCH v3 02/12] intel-ipu3: mmu: implement driver

2017-07-28 Thread Tomasz Figa
On Fri, Jul 28, 2017 at 11:10 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 26/07/17 11:38, Tomasz Figa wrote: >> Hi Robin, >> >> On Wed, Jul 19, 2017 at 10:37 PM, Robin Murphy <robin.mur...@arm.com> wrote: >>> On 19/07/17 04:12, Yong Zhi wrote:

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-08 Thread Tomasz Figa
Hi Sakari, On Thu, Jun 8, 2017 at 6:59 AM, Sakari Ailus <sakari.ai...@linux.intel.com> wrote: > Hi Tomasz, > > On Tue, Jun 06, 2017 at 07:13:19PM +0900, Tomasz Figa wrote: >> Hi Yong, Tuukka, >> >> +CC IOMMU ML and Joerg. (Technically you should resend this pat

Re: [PATCH 03/12] intel-ipu3: Add DMA API implementation

2017-06-09 Thread Tomasz Figa
On Fri, Jun 9, 2017 at 3:07 AM, Robin Murphy <robin.mur...@arm.com> wrote: > On 08/06/17 15:35, Tomasz Figa wrote: >> On Thu, Jun 8, 2017 at 10:22 PM, Robin Murphy <robin.mur...@arm.com> wrote: >>> On 07/06/17 10:47, Tomasz Figa wrote: >>>>

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Tomasz Figa
On Fri, Jun 9, 2017 at 1:43 AM, Sakari Ailus <sakari.ai...@iki.fi> wrote: > Hi Tomasz, > > On Wed, Jun 07, 2017 at 05:35:13PM +0900, Tomasz Figa wrote: >> Hi Yong, Tuukka, >> >> Continuing from yesterday. Please see comments inline. >> >> >

[PATCH 1/2] iommu/dma: Respect __GFP_DMA and __GFP_DMA32 in incoming GFP flags

2017-06-27 Thread Tomasz Figa
combination. Fix this by checking for __GFP_DMA and __GFP_DMA32 in incoming GFP flags and adding __GFP_HIGHMEM only if they are not present. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/dma-iommu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[PATCH 2/2] iommu/dma: use __GFP_NOWARN only for high-order allocations

2017-06-27 Thread Tomasz Figa
attempts, which are not critical. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/dma-iommu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 29965a092a69..8507987eed90 100644 --- a/drivers/iom

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-07 Thread Tomasz Figa
Hi Yong, Tuukka, Continuing from yesterday. Please see comments inline. > On Tue, Jun 6, 2017 at 5:39 AM, Yong Zhi wrote: [snip] >> + ptr = ipu3_mmu_alloc_page_table(mmu_dom, false); >> + if (!ptr) >> + goto fail_page_table; >> + >> + /* >> +

Re: [PATCH 03/12] intel-ipu3: Add DMA API implementation

2017-06-07 Thread Tomasz Figa
Hi Yong, +Robin, Joerg, IOMMU ML Please see my comments inline. On Tue, Jun 6, 2017 at 5:39 AM, Yong Zhi wrote: > IPU3 mmu based DMA mapping driver > > Signed-off-by: Yong Zhi > --- > drivers/media/pci/intel/ipu3/Kconfig | 6 + >

Re: [PATCH 03/12] intel-ipu3: Add DMA API implementation

2017-06-08 Thread Tomasz Figa
On Thu, Jun 8, 2017 at 10:22 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 07/06/17 10:47, Tomasz Figa wrote: >> Hi Yong, >> >> +Robin, Joerg, IOMMU ML >> >> Please see my comments inline. >> >> On Tue, Jun 6, 2017 at 5:39 AM, Yong Zhi &

Re: [PATCH 03/12] intel-ipu3: Add DMA API implementation

2017-06-07 Thread Tomasz Figa
Hi Alan, On Thu, Jun 8, 2017 at 2:45 AM, Alan Cox wrote: >> > + struct ipu3_mmu *mmu = to_ipu3_mmu(dev); >> > + dma_addr_t daddr = iommu_iova_to_phys(mmu->domain, dma_handle); >> > + >> > + clflush_cache_range(phys_to_virt(daddr), size); >> >> You

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Tomasz Figa
On Fri, Jun 9, 2017 at 5:26 PM, Tuukka Toivonen <tuukka.toivo...@intel.com> wrote: > Hi Tomasz, > > Couple of small comments below. > > On Wednesday, June 07, 2017 17:35:13 Tomasz Figa wrote: >> >> +static void ipu3_mmu_domain_free(struct iommu_domain *d

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-09 Thread Tomasz Figa
On Fri, Jun 9, 2017 at 8:16 PM, Sakari Ailus <sakari.ai...@iki.fi> wrote: > Hi Tomasz, > > On Fri, Jun 09, 2017 at 02:59:10PM +0900, Tomasz Figa wrote: >> On Fri, Jun 9, 2017 at 1:43 AM, Sakari Ailus <sakari.ai...@iki.fi> wrote: >> >> >> +static void

Re: [PATCH 02/12] intel-ipu3: mmu: implement driver

2017-06-06 Thread Tomasz Figa
Hi Yong, Tuukka, +CC IOMMU ML and Joerg. (Technically you should resend this patch including them.) On Tue, Jun 6, 2017 at 5:39 AM, Yong Zhi wrote: > From: Tuukka Toivonen > > This driver translates Intel IPU3 internal virtual > address to

Re: [PATCH 1/2] iommu/dma: Respect __GFP_DMA and __GFP_DMA32 in incoming GFP flags

2017-06-27 Thread Tomasz Figa
On Tue, Jun 27, 2017 at 8:01 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 27/06/17 08:28, Tomasz Figa wrote: >> Current implementation of __iommu_dma_alloc_pages() keeps adding >> __GFP_HIGHMEM to GFP flags regardless of whether other zone flags are >> already inc

Re: [PATCH 1/2] iommu/dma: Respect __GFP_DMA and __GFP_DMA32 in incoming GFP flags

2017-06-27 Thread Tomasz Figa
On Tue, Jun 27, 2017 at 9:26 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 27/06/17 12:17, Tomasz Figa wrote: >> On Tue, Jun 27, 2017 at 8:01 PM, Robin Murphy <robin.mur...@arm.com> wrote: >>> On 27/06/17 08:28, Tomasz Figa wrote: >>>> Current

Re: [PATCH v2 11/13] iommu/rockchip: Use OF_IOMMU to attach devices automatically

2018-01-16 Thread Tomasz Figa
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: > Converts the rockchip-iommu driver to use the OF_IOMMU infrastructure, > which allows attaching master devices to their IOMMUs automatically > according to DT properties. > > Signed-off-by: Jeffy Chen

Re: [PATCH v2 04/13] iommu/rockchip: Fix error handling in probe

2018-01-16 Thread Tomasz Figa
gt; Changes in v2: None > > drivers/iommu/rockchip-iommu.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > Reviewed-by: Tomasz Figa <tf...@chromium.org> Best regards, Tomasz ___ iommu mailing list iommu@lists.

Re: [PATCH v2 05/13] iommu/rockchip: Fix error handling in init

2018-01-16 Thread Tomasz Figa
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: > It's hard to undo bus_set_iommu() in the error path, so move it to the > end of rk_iommu_probe(). Does this work fine now? I remember we used to need this called in an early initcall for all the ARM/ARM64 DMA stuff

Re: [PATCH v2 02/13] iommu/rockchip: Suppress unbinding

2018-01-16 Thread Tomasz Figa
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: > It's not safe to unbind rockchip IOMMU driver. Might be good to explain why it is not safe and actually add that it does not make any sense for such low level devices. Best regards, Tomasz

Re: [PATCH v2 01/13] iommu/rockchip: Request irqs in rk_iommu_probe()

2018-01-16 Thread Tomasz Figa
Hi Jeffy, Thanks for the patch. Please see my comments inline. On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: Please add patch description. > Suggested-by: Robin Murphy > Signed-off-by: Jeffy Chen > --- [snip]

Re: [PATCH v2 02/13] iommu/rockchip: Suppress unbinding

2018-01-16 Thread Tomasz Figa
On Wed, Jan 17, 2018 at 1:23 PM, Tomasz Figa <tf...@chromium.org> wrote: > On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen <jeffy.c...@rock-chips.com> > wrote: >> It's not safe to unbind rockchip IOMMU driver. > > Might be good to explain why it is not safe and actual

Re: [PATCH v2 10/13] iommu/rockchip: Use IOMMU device for dma mapping operations

2018-01-16 Thread Tomasz Figa
for Exynos IOMMU as well. With that fixed (probably squashed to the patch that prohibits unbind): Reviewed-by: Tomasz Figa <tf...@chromium.org> Best regards, Tomasz ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 12/13] iommu/rockchip: Add runtime PM support

2018-01-16 Thread Tomasz Figa
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: > When the power domain is powered off, the IOMMU cannot be accessed and > register programming must be deferred until the power domain becomes > enabled. > > Add runtime PM support, and use runtime PM device link from

Re: [PATCH v3 01/12] iommu/rockchip: Prohibiat unbind and remove

2018-01-17 Thread Tomasz Figa
m> > --- > > Changes in v3: > Also remove remove() and module_exit() as Tomasz suggested. > > Changes in v2: None > > drivers/iommu/rockchip-iommu.c | 21 + > 1 file changed, 1 insertion(+), 20 deletions(-) nit: Typo in subject: s/Prohibiat/Prohibit/

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-01-30 Thread Tomasz Figa
Hi Rob, On Wed, Jan 31, 2018 at 2:05 AM, Rob Herring <r...@kernel.org> wrote: > On Wed, Jan 24, 2018 at 06:35:11PM +0800, Jeffy Chen wrote: >> From: Tomasz Figa <tf...@chromium.org> >> >> Current code relies on master driver enabling necessary clocks bef

Re: [PATCH v7 1/6] base: power: runtime: Export pm_runtime_get/put_suppliers

2018-02-13 Thread Tomasz Figa
On Tue, Feb 13, 2018 at 9:00 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 13/02/18 07:44, Tomasz Figa wrote: >> >> Hi Vivek, >> >> On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam >> <vivek.gau...@codeaurora.org> wrote: >>> >>&

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

2018-02-13 Thread Tomasz Figa
On Tue, Feb 13, 2018 at 9:57 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 13/02/18 08:24, Tomasz Figa wrote: >> >> Hi Vivek, >> >> Thanks for the patch. Please see my comments inline. >> >> On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam >>

  1   2   3   >