Re: [PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Cho KyongHo
On Tue, Aug 18, 2020 at 05:10:06PM +0100, Christoph Hellwig wrote: > On Tue, Aug 18, 2020 at 11:07:57AM +0100, Will Deacon wrote: > > > > so I'm not sure > > > > that we should be complicating the implementation like this to try to > > > > make it "fast". > > > > > > > I agree that this patch make

Re: [PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Cho KyongHo
On Tue, Aug 18, 2020 at 11:07:57AM +0100, Will Deacon wrote: > On Tue, Aug 18, 2020 at 06:37:39PM +0900, Cho KyongHo wrote: > > On Tue, Aug 18, 2020 at 09:28:53AM +0100, Will Deacon wrote: > > > On Tue, Aug 18, 2020 at 04:43:10PM +0900, Cho KyongHo wrote: > > > > C

Re: [PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Cho KyongHo
On Tue, Aug 18, 2020 at 09:37:20AM +0100, Christoph Hellwig wrote: > On Tue, Aug 18, 2020 at 09:28:53AM +0100, Will Deacon wrote: > > On Tue, Aug 18, 2020 at 04:43:10PM +0900, Cho KyongHo wrote: > > > Cache maintenance operations in the most of CPU architectures needs > >

Re: [PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Cho KyongHo
On Tue, Aug 18, 2020 at 09:28:53AM +0100, Will Deacon wrote: > On Tue, Aug 18, 2020 at 04:43:10PM +0900, Cho KyongHo wrote: > > Cache maintenance operations in the most of CPU architectures needs > > memory barrier after the cache maintenance for the DMAs to view the > >

[PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Cho KyongHo
() which do not involve memory barrier. So the users called those functions require explicitly calling arch_sync_barrier_for_device() and arch_sync_barrier_for_cpu(), respectively to confirm the view of memory is consistent between the CPUs and DMAs. Signed-off-by: Cho KyongHo --- drivers/iommu/dma

[PATCH 2/2] arm64: dma-mapping: add relaxed DMA sync

2020-08-18 Thread Cho KyongHo
() are introduced since commit 6a9356234 ("dma-mapping: introduce relaxed version of dma sync") to reduce redundant memory barriers in sg versions of DMA sync API. Implementing relaxed version of DMA sync API will dramatically increase the performance of dma_sync_sg_for_{device|cpu}(). Sig

Re: [PATCH v6 12/25] iommu: exynos: add support for runtime_pm

2015-05-10 Thread Cho KyongHo
On Mon, 04 May 2015 10:16:07 +0200 Marek Szyprowski wrote: > This patch fixes support for runtime power management for SYSMMU > controllers, so they are enabled when master device is attached. > You should later think that this style of runtime PM support will increase the leakage current beca

Re: [PATCH v6 11/25] iommu: exynos: add support for binding more than one sysmmu to master device

2015-05-10 Thread Cho KyongHo
On Mon, 04 May 2015 10:16:06 +0200 Marek Szyprowski wrote: > This patch adds support for assigning more than one SYSMMU controller to > the master device. This has been achieved simply by chaning the struct > device pointer in struct exynos_iommu_owner into the list of struct > sysmmu_drvdata of

Re: [PATCH v6 08/25] iommu: exynos: refactor function parameters to simplify code

2015-05-10 Thread Cho KyongHo
On Mon, 04 May 2015 10:16:03 +0200 Marek Szyprowski wrote: > This patch simplifies the code by: > - refactoring function parameters from struct device pointer to direct > pointer to struct sysmmu drvdata > - moving list_head enteries from struct exynos_iommu_owner directly to > struct sysmmu

Re: [PATCH v6 06/25] iommu: exynos: remove unused functions

2015-05-10 Thread Cho KyongHo
On Mon, 04 May 2015 10:16:01 +0200 Marek Szyprowski wrote: > This patch removes two unneeded functions, which are not a part of > generic IOMMU API and were never used by any other driver. > > Signed-off-by: Marek Szyprowski > --- > drivers/iommu/exynos-iommu.c | 31 --

Re: [PATCH v6 05/25] iommu: exynos: don't read version register on every tlb operation

2015-05-10 Thread Cho KyongHo
On Mon, 04 May 2015 10:16:00 +0200 Marek Szyprowski wrote: > This patch removes reading of REG_MMU_VERSION register on every tlb > operation and caches SYSMMU version in driver's internal data. > > Signed-off-by: Marek Szyprowski > --- > drivers/iommu/exynos-iommu.c | 13 + > 1 fi

Re: [PATCH] iommu/exynos: Select ARM_DMA_USE_IOMMU

2014-07-04 Thread Cho KyongHo
" > depends on ARCH_EXYNOS > select IOMMU_API > + select ARM_DMA_USE_IOMMU > help > Support for the IOMMU (System MMU) of Samsung Exynos application > processor family. This enables H/W multimedia acce

Re: [PATCH] devicetree: Add generic IOMMU device tree bindings

2014-05-17 Thread Cho KyongHo
On Fri, 16 May 2014 14:23:18 +0200, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU and Tegra SMMU as

Re: [PATCH v12 11/31] documentation: iommu: add binding document of Exynos System MMU

2014-05-15 Thread Cho KyongHo
On Thu, 15 May 2014 22:37:31 +0200, Thierry Reding wrote: > On Mon, Apr 28, 2014 at 02:05:30PM +0200, Arnd Bergmann wrote: > [...] > > let me clarify by example: > > > > iommu@1 { > > compatible = "some,simple-iommu"; > > reg = <1>; > > #iommu-cells = <0>; /

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

2014-05-09 Thread Cho KyongHo
On Tue, 06 May 2014 20:05:14 +0200, Tomasz Figa wrote: > On 27.04.2014 09:37, Shaik Ameer Basha wrote: > > From: Cho KyongHo > > > > Some master device descriptor like fimc-is which is an abstraction > > of very complex H/W may have multiple System MMUs. For those dev

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

2014-05-06 Thread Cho KyongHo
On Tue, 06 May 2014 20:08:47 +0200, Tomasz Figa wrote: > 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 IOMM

Re: [PATCH v12 30/31] ARM: dts: add System MMU nodes of exynos5250

2014-05-01 Thread Cho KyongHo
On Mon, 28 Apr 2014 16:13:19 -0700, Doug Anderson wrote: > Vikas, > > > On Sun, Apr 27, 2014 at 10:39 AM, Vikas Sajjan wrote: > > Hi shaik, > > > > +Doug, Abhilash, > > > > On Sun, Apr 27, 2014 at 1:08 PM, Shaik Ameer Basha > > wrote: >

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

2014-05-01 Thread Cho KyongHo
On Mon, 28 Apr 2014 16:08:14 +0530, Tushar Behera wrote: > On 04/27/2014 01:07 PM, Shaik Ameer Basha wrote: > > From: Cho KyongHo > > > > Some master device descriptor like fimc-is which is an abstraction > > of very complex H/W may have multiple System MMUs. For those

Re: [PATCH v12 15/31] iommu/exynos: handle 'mmu-masters' property of DT and improve handling sysmmu

2014-05-01 Thread Cho KyongHo
On Sun, 27 Apr 2014 20:17:48 +0200, Arnd Bergmann wrote: > On Sunday 27 April 2014 13:07:47 Shaik Ameer Basha wrote: > > @@ -542,14 +592,41 @@ static int __init exynos_sysmmu_probe(struct > > platform_device *pdev) > > } > > } > > > > + /* Relation between master and System MMU

Re: [PATCH v12 11/31] documentation: iommu: add binding document of Exynos System MMU

2014-05-01 Thread Cho KyongHo
On Tue, 29 Apr 2014 23:00:29 +0200, Arnd Bergmann wrote: > On Tuesday 29 April 2014 13:07:54 Grant Grundler wrote: > > On Tue, Apr 29, 2014 at 11:16 AM, Dave Martin wrote: > > ... > > > An IOMMU is really a specialised bridge > > > > Is a GART a bridge? > > > > IOMMUs can provide three basic fun

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

2014-04-22 Thread Cho KyongHo
On Tue, 22 Apr 2014 18:53:51 +0530, Shaik Ameer Basha wrote: > Hi KyongHo Cho, > > > > On Fri, Mar 14, 2014 at 10:40 AM, Cho KyongHo wrote: > > Some master device descriptor like fimc-is which is an abstraction > > of very complex H/W may have multiple System MMUs.

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

2014-04-22 Thread Cho KyongHo
On Sun, 20 Apr 2014 15:25:59 +0530, Shaik Ameer Basha wrote: > Hi KyongHo Cho, > > Please find the comments inline. > > On Fri, Mar 14, 2014 at 10:36 AM, Cho KyongHo wrote: > > This patch adds dts entries for the System MMU devices found on > > Exynos4 and Exynos5 So

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

2014-03-20 Thread Cho KyongHo
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: > >>>&g

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

2014-03-20 Thread Cho KyongHo
On Thu, 20 Mar 2014 11:44:50 +0100, Tomasz Figa wrote: > 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 wrote: > >&g

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

2014-03-20 Thread Cho KyongHo
On Wed, 19 Mar 2014 19:51:21 +0100, Tomasz Figa wrote: > On 19.03.2014 19:37, Grant Grundler wrote: > > On Wed, Mar 19, 2014 at 10:30 AM, Tomasz Figa wrote: > > ... > >> As I said, AFAIK the trend is to get rid of ordering by initcalls and make > >> sure that drivers can handle missing dependencie

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

2014-03-20 Thread Cho KyongHo
On Wed, 19 Mar 2014 09:54:39 -0700, Grant Grundler wrote: > On Wed, Mar 19, 2014 at 6:12 AM, Tomasz Figa wrote: > ... > >> Device driver is not only for the scholarship but also for the real use. > > > > Huh? I'm not sure what kind of comment is this. > > I'm guessing Cho meant: "This isn't an ac

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

2014-03-20 Thread Cho KyongHo
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,

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

2014-03-20 Thread Cho KyongHo
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 wrote: > >> On Tue, 18 Mar 2014 16:14:53 +0100, Tomasz Figa wrote: > >>> On 18.03.2014 12:09, Cho KyongHo wrote: > >&g

Re: [PATCH v11 24/27] iommu/exynos: use exynos-iommu specific typedef

2014-03-20 Thread Cho KyongHo
On Tue, 18 Mar 2014 18:33:20 -0700, Grant Grundler wrote: > On Thu, Mar 13, 2014 at 10:13 PM, Cho KyongHo wrote: > > This commit introduces sysmmu_pte_t for page table entries and > > sysmmu_iova_t vor I/O virtual address that is manipulated by > > exynos-iommu driver. The p

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

2014-03-19 Thread Cho KyongHo
On Tue, 18 Mar 2014 16:33:04 +0100, Tomasz Figa wrote: > 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] >

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

2014-03-19 Thread Cho KyongHo
On Tue, 18 Mar 2014 16:25:11 +0100, Tomasz Figa wrote: > 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_devic

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

2014-03-19 Thread Cho KyongHo
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:35, Cho KyongHo wrote: > >>> This patch u

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

2014-03-19 Thread Cho KyongHo
On Wed, 19 Mar 2014 08:59:09 +0900, Jingoo Han wrote: > On Wednesday, March 19, 2014 12:12 AM, Tomasz Figa wrote: > > On 18.03.2014 11:38, Cho KyongHo wrote: > > > On Fri, 14 Mar 2014 14:28:36 +0100, Tomasz Figa wrote: > > >> On 14.03.2014 06:05, Cho KyongHo wrote: &

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

2014-03-19 Thread Cho KyongHo
On Tue, 18 Mar 2014 16:46:24 +0530, Sachin Kamat wrote: > On 18 March 2014 16:44, Cho KyongHo wrote: > > On Fri, 14 Mar 2014 20:57:42 +0530, Sachin Kamat wrote: > >> Hi KyongHo, > >> > >> On 14 March 2014 10:39, Cho KyongHo wrote: > >> > > >&

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

2014-03-18 Thread Cho KyongHo
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] > >

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

2014-03-18 Thread Cho KyongHo
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: > >>>

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

2014-03-18 Thread Cho KyongHo
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, > > the

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 17:07:53 +0100, Tomasz Figa wrote: > Hi KyongHo, > > On 14.03.2014 06:10, Cho KyongHo wrote: > > This adds support for Suspend to RAM and Runtime Power Management. > > > > Since System MMU is located in the same local power domain of its > &g

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 20:57:42 +0530, Sachin Kamat wrote: > Hi KyongHo, > > On 14 March 2014 10:39, Cho KyongHo wrote: > > This commit adds device tree support for System MMU. > > > > Signed-off-by: Cho KyongHo > > --- > > drivers/iommu/Kconfig

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 20:52:43 +0530, Sachin Kamat wrote: > Hi KyongHo, > > On 14 March 2014 10:35, Cho KyongHo wrote: > > This patch uses managed device helper functions in the probe(). > > > > Signed-off-by: Cho KyongHo > > --- > [snip] > > >

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 22:27:59 +0530, Sachin Kamat wrote: > Hi KyongHo, > > On 14 March 2014 19:13, Tomasz Figa wrote: > > Hi KyongHo, > > > > > > On 14.03.2014 06:09, Cho KyongHo wrote: > >> > >> exynos-iommu driver must care about master H/W&#

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 14:39:33 +0100, Tomasz Figa wrote: > 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 > > --- > > drivers/iommu/Kconfig|5 +

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

2014-03-18 Thread Cho KyongHo
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 > > --- > >

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 14:07:32 +0100, Tomasz Figa wrote: > 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 sing

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

2014-03-18 Thread Cho KyongHo
On Fri, 14 Mar 2014 13:59:00 +0100, Tomasz Figa wrote: > 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 > >

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

2014-03-16 Thread Cho KyongHo
On Fri, 14 Mar 2014 13:20:23 +0100, Tomasz Figa wrote: > 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. >

Re: [PATCH v11 11/27] clk: exynos: add gate clock descriptions of System MMU

2014-03-16 Thread Cho KyongHo
On Fri, 14 Mar 2014 13:17:26 +0100, Tomasz Figa wrote: > 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

Re: [PATCH v11 01/27] iommu/exynos: do not include removed header

2014-03-16 Thread Cho KyongHo
On Fri, 14 Mar 2014 17:29:36 +0530, Sachin Kamat wrote: > On 14 March 2014 17:19, Cho KyongHo wrote: > >> From: Sachin Kamat [mailto:sachin.ka...@linaro.org] > >> Sent: Friday, March 14, 2014 7:00 PM > >> > >> On 14 March 2014 10:31, Cho KyongHo wrote

RE: [PATCH v11 01/27] iommu/exynos: do not include removed header

2014-03-14 Thread Cho KyongHo
> From: Sachin Kamat [mailto:sachin.ka...@linaro.org] > Sent: Friday, March 14, 2014 7:00 PM > > On 14 March 2014 10:31, Cho KyongHo wrote: > > Commit 25e9d28d92 (ARM: EXYNOS: remove system mmu initialization from > > exynos tree) removed arch/arm/mach-exynos/mach

[PATCH v11 27/27] iommu/exynos: enhanced error messages

2014-03-13 Thread Cho KyongHo
Some redundant error message is removed and some error messages are changed to error level from debug level. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

[PATCH v11 25/27] iommu/exynos: use simpler function to get MMU version

2014-03-13 Thread Cho KyongHo
This commit changes the function to get MMU version simpler. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 30 ++ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index

[PATCH v11 26/27] iommu/exynos: apply workaround of caching fault page table entries

2014-03-13 Thread Cho KyongHo
2 page table entries. This is the size between 256K ~ 384K. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 164 +- 1 file changed, 147 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c

[PATCH v11 24/27] iommu/exynos: use exynos-iommu specific typedef

2014-03-13 Thread Cho KyongHo
This commit introduces sysmmu_pte_t for page table entries and sysmmu_iova_t vor I/O virtual address that is manipulated by exynos-iommu driver. The purpose of the typedef is to remove dependencies to the driver code from the change of CPU architecture from 32 bit to 64 bit. Signed-off-by: Cho

[PATCH v11 22/27] iommu/exynos: add devices attached to the System MMU to an IOMMU group

2014-03-13 Thread Cho KyongHo
Patch written by Antonios Motakis : IOMMU groups are expected by certain users of the IOMMU API, e.g. VFIO. Since each device is behind its own System MMU, we can allocate a new IOMMU group for each device. Reviewd-by: Cho KyongHo Signed-off-by: Antonios Motakis --- drivers/iommu/exynos

[PATCH v11 23/27] iommu/exynos: fix address handling

2014-03-13 Thread Cho KyongHo
Use of __pa and __va macro is changed to virt_to_phys and phys_to_virt which are recommended in driver code. printk formatting of physical address is also fixed to %pa. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 45 +++--- 1 file changed

[PATCH v11 21/27] iommu/exynos: change rwlock to spinlock

2014-03-13 Thread Cho KyongHo
Since acquiring read_lock is not more frequent than write_lock, it is not beneficial to use rwlock, this commit changes rwlock to spinlock. Reviewed-by: Grant Grundler Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 39 --- 1 file changed, 20

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

2014-03-13 Thread Cho KyongHo
to master H/W and that has a pointer to the device descriptor of a System MMU. Given a device descriptor of a master H/W, it is possible to traverse all System MMUs that must be controlled along with the master H/W. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 534

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

2014-03-13 Thread Cho KyongHo
domain, its driver must call iommu_attach_device() after its local power domain is turned on, iommu_detach_device before turned off. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 220 ++ 1 file changed, 201 insertions(+), 19 deletions

[PATCH v11 14/27] iommu/exynos: gating clocks of master H/W

2014-03-13 Thread Cho KyongHo
prohibited unless both of the gating clocks of System MMU and its master H/W. CC: Tomasz Figa Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers

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

2014-03-13 Thread Cho KyongHo
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 --- drivers/iommu/exynos-iommu.c | 34 ++-

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

2014-03-13 Thread Cho KyongHo
This commit adds device tree support for System MMU. Signed-off-by: Cho KyongHo --- drivers/iommu/Kconfig|5 ++--- drivers/iommu/exynos-iommu.c | 21 + 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig

[PATCH v11 18/27] iommu/exynos: turn on useful configuration options

2014-03-13 Thread Cho KyongHo
policy is remained as reserved. QoS value of page table walking is set to 15 (highst value). System MMU 3.3 can inherit QoS value of page table walking from its master H/W's transaction. This new feature is enabled by default and QoS value written to MMU_CFG is ignored. Signed-off-by: Cho Ky

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

2014-03-13 Thread Cho KyongHo
ts to exynos-iommu driver. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 369 +++--- 1 file changed, 238 insertions(+), 131 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 3458349..6834556 100644

[PATCH v11 16/27] iommu/exynos: remove custom fault handler

2014-03-13 Thread Cho KyongHo
This commit removes custom fault handler. The device drivers that need to register fault handler can register with iommu_set_fault_handler(). CC: Grant Grundler Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 80 +- 1 file changed, 24

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

2014-03-13 Thread Cho KyongHo
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 CC: Sylwester Nawrocki Signed-off-by: Cho KyongHo --- .../bindings/iommu/samsung,exynos4210-sysmmu.txt | 86 +++ arch/arm/boot/dts

[PATCH v11 11/27] clk: exynos: add gate clock descriptions of System MMU

2014-03-13 Thread Cho KyongHo
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: Cho KyongHo --- .../devicetree/bindings/clock

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

2014-03-13 Thread Cho KyongHo
This patch uses managed device helper functions in the probe(). Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 64 +- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos

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

2014-03-13 Thread Cho KyongHo
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. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos

[PATCH v11 09/27] iommu/exynos: remove dbgname from drvdata of a System MMU

2014-03-13 Thread Cho KyongHo
This patch removes dbgname member from sysmmu_drvdata structure. Kernel message for debugging already has the name of a single System MMU node. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions

[PATCH v11 06/27] iommu/exynos: allocate lv2 page table from own slab

2014-03-13 Thread Cho KyongHo
Since kmalloc() does not guarantee that the allignment of 1KiB when it allocates 1KiB, it is required to allocate lv2 page table from own slab that guarantees alignment of 1KiB Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 34 -- 1 file changed

[PATCH v11 07/27] iommu/exynos: always enable runtime PM

2014-03-13 Thread Cho KyongHo
obing device has a parent device. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index bee1bb1..8dc7031 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/dr

[PATCH v11 05/27] iommu/exynos: remove prefetch buffer setting

2014-03-13 Thread Cho KyongHo
controled with care because there are some restrictions in H/W design. The interface and implementation to initiate prefetch buffers will be prepared later. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/iommu

[PATCH v11 03/27] iommu/exynos: change error handling when page table update is failed

2014-03-13 Thread Cho KyongHo
This patch changes not to panic on any error when updating page table. Instead prints error messages with callstack. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 58 -- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a

[PATCH v11 04/27] iommu/exynos: fix L2TLB invalidation

2014-03-13 Thread Cho KyongHo
that the L2TLB has no stale data. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4a74ed8..0d26aeb 100644 --- a/drivers

[PATCH v11 02/27] iommu/exynos: add missing cache flush for removed page table entries

2014-03-13 Thread Cho KyongHo
: Cho KyongHo --- drivers/iommu/exynos-iommu.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4876d35..1c3a397 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -958,6 +958,7 @@ static size_t

[PATCH v11 01/27] iommu/exynos: do not include removed header

2014-03-13 Thread Cho KyongHo
exynos-iommu.c. CC: Tomasz Figa Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 0740189..4876d35 100644 --- a/drivers/iommu/exynos-iommu.c +++ b

[PATCH v11 00/27] iommu/exynos: Fixes and Enhancements of System MMU driver with DT

2014-03-13 Thread Cho KyongHo
Sorry for the delayed posting the v11 patchset. The current exynos-iommu(System MMU) driver does not work autonomously since it is lack of support for power management of peripheral blocks. For example, MFC device driver must ensure that its System MMU is disabled before MFC block is power-down no

RE: [PATCH] iommu/exynos: Remove driver

2014-02-13 Thread Cho KyongHo
> -Original Message- > From: Olof Johansson [mailto:o...@lixom.net] > Sent: Friday, February 14, 2014 4:34 AM > > On Mon, Feb 10, 2014 at 10:21 PM, Kukjin Kim wrote: > > > Just adding KyongHo Cho. > > > > If he can fixup for this time, it would be best solution because he knows > > well

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

2013-11-01 Thread Cho KyongHo
On Fri, 01 Nov 2013 14:10:47 +0100, Joerg Roedel wrote: > Hi Cho, > > On Fri, Nov 01, 2013 at 09:37:45PM +0900, Cho KyongHo wrote: > > I am preparing next patches to apply Alex Williamson's comment that > > description of IOMMU's masters must be aligned with ARM S

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

2013-11-01 Thread Cho KyongHo
On Fri, 01 Nov 2013 12:42:24 +0100, Joerg Roedel wrote: > On Mon, Oct 07, 2013 at 10:52:12AM +0900, Cho KyongHo wrote: > > Patch summary: > > [PATCH 01/20] iommu/exynos: do not include removed header > > [PATCH 02/20] iommu/exynos: add missing cache flush for removed pa

Re: [PATCH v10 20/20] iommu/exynos: add devices attached to the System MMU to an IOMMU group

2013-10-14 Thread Cho KyongHo
On Thu, 10 Oct 2013 14:54:29 -0600, Alex Williamson wrote: > On Mon, 2013-10-07 at 10:58 +0900, Cho KyongHo wrote: > > Patch written by Antonios Motakis : > > > > IOMMU groups are expected by certain users of the IOMMU API, > > e.g. VFIO. Since each device is behind its

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

2013-10-07 Thread Cho KyongHo
On Mon, 07 Oct 2013 08:44:54 -0500, Rob Herring wrote: > On Fri, Jul 26, 2013 at 6:28 AM, Cho KyongHo wrote: > > Signed-off-by: Cho KyongHo > > --- > > .../bindings/iommu/samsung,exynos4210-sysmmu.txt | 103 +++ > > arch/arm/boot/dts/exynos4.dtsi

[PATCH v10 20/20] iommu/exynos: add devices attached to the System MMU to an IOMMU group

2013-10-06 Thread Cho KyongHo
Patch written by Antonios Motakis : IOMMU groups are expected by certain users of the IOMMU API, e.g. VFIO. Since each device is behind its own System MMU, we can allocate a new IOMMU group for each device. Reviewd-by: Cho KyongHo Signed-off-by: Antonios Motakis --- drivers/iommu/exynos

[PATCH v10 19/20] iommu/exynos: return 0 if iommu_attach_device() successes

2013-10-06 Thread Cho KyongHo
Grundler Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 26ba554..5025338 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu

[PATCH v10 18/20] iommu/exynos: change rwlock to spinlock

2013-10-06 Thread Cho KyongHo
Since acquiring read_lock is not more frequent than write_lock, it is not beneficial to use rwlock, this commit changes rwlock to spinlock. Reviewed-by: Grant Grundler Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 35 ++- 1 files changed, 18

[PATCH v10 17/20] iommu/exynos: add support for power management subsystems.

2013-10-06 Thread Cho KyongHo
domain, its driver must call iommu_attach_device() after its local power domain is turned on, iommu_detach_device before turned off. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 190 +- 1 files changed, 186 insertions(+), 4 deletions

[PATCH v10 14/20] iommu/exynos: remove custom fault handler

2013-10-06 Thread Cho KyongHo
This commit removes custom fault handler. The device drivers that need to register fault handler can register with iommu_set_fault_handler(). CC: Grant Grundler Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 80 - 1 files changed, 24

[PATCH v10 15/20] iommu/exynos: remove calls to Runtime PM API functions

2013-10-06 Thread Cho KyongHo
ts to exynos-iommu driver. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 337 +- 1 files changed, 201 insertions(+), 136 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 976b88a..d9c5416 100644

[PATCH v10 13/20] iommu/exynos: gating clocks of master H/W

2013-10-06 Thread Cho KyongHo
prohibited unless both of the gating clocks of System MMU and its master H/W. CC: Tomasz Figa Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 75 +++-- 1 files changed, 56 insertions(+), 19 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b

[PATCH v10 11/20] ARM: dts: Add description of System MMU of Exynos SoCs

2013-10-06 Thread Cho KyongHo
This patch adds dts entries for the System MMU devices found on Exynos4 and Exynos5 SoC series and the System MMU binding documentation. CC: Sylwester Nawrocki Signed-off-by: Cho KyongHo --- .../bindings/iommu/samsung,exynos4210-sysmmu.txt | 76 + arch/arm/boot/dts/exynos4.dtsi

[PATCH v10 16/20] iommu/exynos: turn on useful configuration options

2013-10-06 Thread Cho KyongHo
master H/W's transaction. This new feature is enabled by default and QoS value written to MMU_CFG is ignored. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 20 +--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/exynos-iomm

[PATCH v10 12/20] iommu/exynos: support for device tree

2013-10-06 Thread Cho KyongHo
This commit adds device tree support for System MMU. This also include the following changes and enhancements: * use managed device helper functions. Simplyfies System MMU device driver. Signed-off-by: Cho KyongHo --- drivers/iommu/Kconfig|5 ++--- drivers/iommu/exynos-iommu.c

[PATCH v10 10/20] clk: exynos: add gate clock descriptions of System MMU

2013-10-06 Thread Cho KyongHo
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: Cho KyongHo --- .../devicetree/bindings/clock

[PATCH v10 09/20] iommu/exynos: use managed device helper functions

2013-10-06 Thread Cho KyongHo
This patch uses managed device helper functions in the probe(). Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 64 - 1 files changed, 25 insertions(+), 39 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos

[PATCH v10 08/20] iommu/exynos: remove dbgname from drvdata of a System MMU

2013-10-06 Thread Cho KyongHo
This patch removes dbgname member from sysmmu_drvdata structure. Kernel message for debugging already has the name of a single System MMU node. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 34 +- 1 files changed, 13 insertions(+), 21 deletions

[PATCH v10 06/20] iommu/exynos: always enable runtime PM

2013-10-06 Thread Cho KyongHo
obing device has a parent device. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 191cb3f..20b032f 100644 --- a/drivers/iommu/exynos-iommu.c

[PATCH v10 07/20] iommu/exynos: always use a single clock descriptor

2013-10-06 Thread Cho KyongHo
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. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos

[PATCH v10 05/20] iommu/exynos: allocate lv2 page table from own slab

2013-10-06 Thread Cho KyongHo
Since kmalloc() does not guarantee that the allignment of 1KiB when it allocates 1KiB, it is required to allocate lv2 page table from own slab that guarantees alignment of 1KiB Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 34 -- 1 files changed

[PATCH v10 04/20] iommu/exynos: fix L2TLB invalidation

2013-10-06 Thread Cho KyongHo
that the L2TLB has no stale data. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 27 ++- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4a74ed8..cbe1e5a 100644 --- a/drivers

[PATCH v10 03/20] iommu/exynos: change error handling when page table update is failed

2013-10-06 Thread Cho KyongHo
This patch changes not to panic on any error when updating page table. Instead prints error messages with callstack. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 58 +++-- 1 files changed, 44 insertions(+), 14 deletions(-) diff --git a

  1   2   >