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 11/27] clk: exynos: add gate clock descriptions of System MMU

2014-03-14 Thread Tomasz Figa
Hi KyongHo, On 14.03.2014 06:06, Cho KyongHo wrote: This adds gate clocks of all System MMUs and their master IPs that are not apeared in clk-exynos5250.c and clk-exynos5420.c Also fixes GATE_IP_ACP to 0x18800 and changed GATE_DA to GATE for System MMU clocks in clk-exynos4.c Signed-off-by:

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 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-03-09 Thread Tomasz Figa
Hi, You can find part 2 of my comments inline. On Fri, Mar 6, 2015 at 7:48 PM, yong...@mediatek.com wrote: [snip] +static irqreturn_t mtk_iommu_isr(int irq, void *dev_id) +{ + struct iommu_domain *domain = dev_id; + struct mtk_iommu_domain *mtkdomain = domain-priv; +

Re: [PATCH 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-03-09 Thread Tomasz Figa
On Mon, Mar 9, 2015 at 11:46 PM, Yingjoe Chen yingjoe.c...@mediatek.com wrote: On Mon, 2015-03-09 at 20:11 +0900, Tomasz Figa wrote: ... +/* + * pimudev is a global var for dma_alloc_coherent. + * It is not accepatable, we will delete it if domain_alloc is enabled + */ +static struct

Re: [PATCH 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-03-09 Thread Tomasz Figa
On Tue, Mar 10, 2015 at 12:41 PM, Yingjoe Chen yingjoe.c...@mediatek.com wrote: On Tue, 2015-03-10 at 02:00 +0900, Tomasz Figa wrote: On Mon, Mar 9, 2015 at 11:46 PM, Yingjoe Chen yingjoe.c...@mediatek.com wrote: On Mon, 2015-03-09 at 20:11 +0900, Tomasz Figa wrote

Re: [PATCH 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-03-11 Thread Tomasz Figa
Hi, Please find next part of my comments inline. On Fri, Mar 6, 2015 at 7:48 PM, yong...@mediatek.com wrote: [snip] +/* + * pimudev is a global var for dma_alloc_coherent. + * It is not accepatable, we will delete it if domain_alloc is enabled It looks like we indeed need to use

Re: [PATCH] CHROMIUM: iommu: rockchip: Make sure that page table state is coherent

2015-03-23 Thread Tomasz Figa
Sorry, I had to dig my way out through my backlog. On Tue, Mar 3, 2015 at 10:36 PM, Joerg Roedel j...@8bytes.org wrote: On Mon, Feb 09, 2015 at 08:19:21PM +0900, Tomasz Figa wrote: Even though the code uses the dt_lock spin lock to serialize mapping operation from different threads, it does

[PATCH v2] CHROMIUM: iommu: rockchip: Make sure that page table state is coherent

2015-04-20 Thread Tomasz Figa
. To fix both issues, this patch makes the mapping code zap first and last (if they are different) IOVAs of new mapping after the page table is updated. Signed-off-by: Tomasz Figa tf...@chromium.org Reviewed-by: Daniel Kurtz djku...@chromium.org Tested-by: Heiko Stuebner he...@sntech.de --- drivers

Re: [PATCH v2] CHROMIUM: iommu: rockchip: Make sure that page table state is coherent

2015-05-08 Thread Tomasz Figa
On Thu, Apr 23, 2015 at 6:09 PM, Daniel Kurtz djku...@chromium.org wrote: On Mon, Apr 20, 2015 at 7:43 PM, Tomasz Figa tf...@chromium.org wrote: To flush created mappings, current mapping code relies on the fact that during unmap the driver zaps every IOVA being unmapped and that it is enough

Re: [PATCH 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-04-14 Thread Tomasz Figa
On Tue, Apr 14, 2015 at 3:31 PM, Yong Wu yong...@mediatek.com wrote: + + piommu-protect_va = devm_kmalloc(piommu-dev, MTK_PROTECT_PA_ALIGN*2, style: Operators like * should have space on both sides. + GFP_KERNEL); Shouldn't

Re: [PATCH 2/5] iommu/mediatek: Add mt8173 IOMMU driver

2015-04-15 Thread Tomasz Figa
On Wed, Apr 15, 2015 at 4:06 PM, Yong Wu yong...@mediatek.com wrote: On Wed, 2015-04-15 at 11:20 +0900, Tomasz Figa wrote: On Tue, Apr 14, 2015 at 3:31 PM, Yong Wu yong...@mediatek.com wrote: + + piommu-protect_va = devm_kmalloc(piommu-dev, MTK_PROTECT_PA_ALIGN*2

Re: [PATCH v2 1/6] dt-bindings: iommu: Add binding for mediatek IOMMU

2015-05-25 Thread Tomasz Figa
Hi, Please see my comments inline. On Fri, May 15, 2015 at 6:43 PM, Yong Wu yong...@mediatek.com wrote: This patch add mediatek iommu dts binding document. Signed-off-by: Yong Wu yong...@mediatek.com --- .../devicetree/bindings/iommu/mediatek,iommu.txt | 51 ++

Re: [PATCH v2 2/6] dt-bindings: mediatek: Add smi dts binding

2015-05-25 Thread Tomasz Figa
Hi, Please see my comments inline. On Fri, May 15, 2015 at 6:43 PM, Yong Wu yong...@mediatek.com wrote: This patch add smi binding document. Signed-off-by: Yong Wu yong...@mediatek.com --- .../bindings/soc/mediatek/mediatek,smi-larb.txt| 24 ++

Re: [PATCH v2 5/6] iommu/mediatek: Add mt8173 IOMMU driver

2015-05-25 Thread Tomasz Figa
Hi, Please see my comments inline. On Fri, May 15, 2015 at 6:43 PM, Yong Wu yong...@mediatek.com wrote: [snip] + +struct mtk_iommu_info { + void __iomem*base; + int irq; + struct device *dev; + struct device

Re: [PATCH v6 1/3] iommu: Implement common IOMMU ops for DMA mapping

2015-11-02 Thread Tomasz Figa
On Mon, Nov 2, 2015 at 10:11 PM, Daniel Kurtz wrote: > > +Tomasz, so he can reply to the thread > +Marek and Russell as recommended by Tomasz > > On Oct 30, 2015 22:27, "Robin Murphy" wrote: > > > > Hi Dan, > > > > On 30/10/15 01:17, Daniel Kurtz

Re: [PATCH v6 1/3] iommu: Implement common IOMMU ops for DMA mapping

2015-11-03 Thread Tomasz Figa
On Wed, Nov 4, 2015 at 2:41 AM, Robin Murphy <robin.mur...@arm.com> wrote: > Hi Tomasz, > > On 02/11/15 13:43, Tomasz Figa wrote: >> >> I'd like to know what is the boundary mask and what hardware imposes >> requirements like this. The cost here is not only over-a

Re: [PATCH v6 1/3] iommu: Implement common IOMMU ops for DMA mapping

2015-11-03 Thread Tomasz Figa
On Wed, Nov 4, 2015 at 3:40 AM, Russell King - ARM Linux <li...@arm.linux.org.uk> wrote: > On Tue, Nov 03, 2015 at 05:41:24PM +, Robin Murphy wrote: >> Hi Tomasz, >> >> On 02/11/15 13:43, Tomasz Figa wrote: >> >Agreed. The dma_map_*() API is not guarante

Re: [PATCH v6 1/3] iommu: Implement common IOMMU ops for DMA mapping

2015-11-04 Thread Tomasz Figa
On Wed, Nov 4, 2015 at 6:27 PM, Russell King - ARM Linux <li...@arm.linux.org.uk> wrote: > On Wed, Nov 04, 2015 at 02:12:03PM +0900, Tomasz Figa wrote: >> My understanding of a scatterlist was that it represents a buffer as a >> whole, by joining together its physically d

[RFC PATCH 0/3] iommu: Add range flush operation

2015-09-28 Thread Tomasz Figa
buffer size. ~18M means around 17-19M due do the variance in requested buffer sizes. Tomasz Figa (2): iommu: Add support for out of band flushing iommu/tegra-smmu: Make the driver use out of band flushing Vince Hsu (1): memory: tegra: add TLB cache line size drivers/iommu/iommu.c

[RFC PATCH 2/3] memory: tegra: add TLB cache line size

2015-09-28 Thread Tomasz Figa
org: Rebased, revised commit message.] Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/memory/tegra/tegra114.c | 1 + drivers/memory/tegra/tegra124.c | 3 +++ drivers/memory/tegra/tegra210.c | 1 + drivers/memory/tegra/tegra30.c | 1 + include/soc/tegra/mc.h | 1 +

[RFC PATCH 1/3] iommu: Add support for out of band flushing

2015-09-28 Thread Tomasz Figa
ge flushes and replace it with one flush of full address range on devices which support it. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/iommu.c | 33 ++--- include/linux/iommu.h | 2 ++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git

Re: [RFC PATCH 2/3] memory: tegra: add TLB cache line size

2015-09-29 Thread Tomasz Figa
On Tue, Sep 29, 2015 at 6:43 PM, Thierry Reding <thierry.red...@gmail.com> wrote: > On Tue, Sep 29, 2015 at 02:25:25PM +0900, Tomasz Figa wrote: >> From: Vince Hsu <vinc...@nvidia.com> >> >> This patch adds SMMU line size to Tegra SoC data struct to enable SMM

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Tomasz Figa
On Tue, Sep 29, 2015 at 6:27 PM, Thierry Reding <thierry.red...@gmail.com> wrote: > > On Tue, Sep 29, 2015 at 02:25:23PM +0900, Tomasz Figa wrote: > > Currently the IOMMU subsystem provides 3 basic operations: iommu_map(), > > iommu_map_sg() and iommu_unmap(). iommu_map() c

Re: [RFC PATCH 1/3] iommu: Add support for out of band flushing

2015-09-29 Thread Tomasz Figa
On Tue, Sep 29, 2015 at 6:32 PM, Thierry Reding <thierry.red...@gmail.com> wrote: > On Tue, Sep 29, 2015 at 02:25:24PM +0900, Tomasz Figa wrote: >> This patch adds a new "flush" callback to iommu_ops, which is supposed >> to perform any necessary flushes within

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 7/8] drm/rockchip: Use common IOMMU API to attach devices

2016-06-20 Thread Tomasz Figa
gement, there is no need to use DMA API anymore and this patch wires things to use the new method. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 100 +++-

[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 7/8] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2016-08-12 Thread Tomasz Figa
Hi, On Tue, Aug 9, 2016 at 7:49 AM, Sricharan R wrote: > + > + if (ops->add_device) > + ops = ops->add_device(dev) ? ops : NULL; Patch description fails to mention anything about this change. Also it looks slightly incorrect to lose

Re: [PATCH 6/8] drivers: platform: Remove call to of_dma_(con/decon)figure_ops

2016-08-12 Thread Tomasz Figa
Hi, On Tue, Aug 9, 2016 at 7:49 AM, Sricharan R wrote: > The dma_ops gets configured for the device generically during > the device_attach call. So remove it from the platform bus probe. > Similarly remove the deconfigure calls as well, since it is > now called form the

Re: [PATCH 4/8] of: dma: Split of_configure_dma() into mask and ops configuration

2016-08-12 Thread Tomasz Figa
Hi, On Tue, Aug 9, 2016 at 7:49 AM, Sricharan R wrote: > From: Laurent Pinchart > > The of_configure_dma() function configures both the DMA masks and ops. > Moving DMA ops configuration to probe time would thus also delay >

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

2017-07-26 Thread Tomasz Figa
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: >> From: Tomasz Figa <tf...@chromium.org> >> >> This driver translates Intel IPU3 internal virtual >> address to physical addres

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 10:31 PM, Tomasz Figa <tf...@chromium.org> wrote: > 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, To

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

  1   2   >