Re: [PATCH 5/5] iommu/omap: Fix map protection value handling

2014-03-14 Thread Laurent Pinchart
Hi Suman, Thank you for the review. On Thursday 13 March 2014 19:07:33 Suman Anna wrote: > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > The prot flags passed to the IOMMU map handler are defined in > > include/linux/iommu.h as IOMMU_(READ|WRITE|CACHE|EXEC). However, the > > driver expects

Re: [PATCH 2/5] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()

2014-03-14 Thread Laurent Pinchart
Hi Suman, On Thursday 13 March 2014 17:16:07 Suman Anna wrote: > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > The flush_iotlb_page() function prints a debug message when no > > corresponding page was found in the TLB. That condition is incorrectly > > checked and always resolves to true, gi

Re: [PATCH 3/5] iommu/omap: Flush the TLB only after updating translation table entries

2014-03-14 Thread Laurent Pinchart
Hi Suman, On Thursday 13 March 2014 17:27:38 Suman Anna wrote: > Hi Laurent, > > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > Flushing the TLB before updating translation entries creates a race > > condition and can lead to stale TLB entries if a translation request > > arrives between flu

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

2014-03-14 Thread Sachin Kamat
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/sysmmu.h header without > removing remaining use of it from exynos-iommu driver, thus causing a > compilation error. > > This patch fi

Re: [PATCH 0/5] OMAP IOMMU fixes and IOMMU architecture questions

2014-03-14 Thread Laurent Pinchart
Hi Suman, (CC'ing Joerg Roedel and Marek Szyprowski for the core IOMMU discussion) On Thursday 13 March 2014 21:33:37 Suman Anna wrote: > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > > Hello, > > > > This patch set fixes miscellaneous issues with the OMAP IOMMU driver, > > found when trying

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/sysmmu.h header without > > remo

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

2014-03-14 Thread Sachin Kamat
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: >> > Commit 25e9d28d92 (ARM: EXYNOS: remove system mmu initialization from >> > exynos tree) removed arch/arm/

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: Cho

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 CC: Sylwester Nawrocki Signed-off-by: Cho KyongHo --- .../bindings/iommu/samsung,exyn

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. Run

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 --- drivers/iommu/exynos-iommu.c | 64 +- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/

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 --- drivers/iommu/Kconfig|5 ++--- drivers/iommu/exynos-iommu.c | 21 + 2 files changed, 19 insertions(+), 7 deletions(-) d

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 --- drivers/iommu/exynos-i

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

2014-03-14 Thread Sachin Kamat
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] > + data->clk = devm_clk_get(dev, "sysmmu"); > + if (IS_ERR(data->clk)) { > + dev_info(dev, "No gate clo

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

2014-03-14 Thread Sachin Kamat
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|5 ++--- > drivers/iommu/exynos-iommu.c | 21 + > 2 files changed, 19 insertions(+), 7 del

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

2014-03-14 Thread Tomasz Figa
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 master H/W, System MMU must be initialized before it is working if its power domain was ever turned off. TLB i

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 structur

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Laurent Pinchart
Hi Santosh, On Friday 14 March 2014 12:15:11 Santosh Shilimkar wrote: > + Russell, Arnd > > On Thursday 13 March 2014 10:47 PM, Anna, Suman wrote: > > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: > >> The page table entries must be cleaned from the cache before being > >> accessed by the IOMMU

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

2014-03-14 Thread Sachin Kamat
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's gate clock as well as >> System MMU's gate clock. To enhance readability of the source code, >> macros to gate/ungate those cl

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Arnd Bergmann
On Friday 14 March 2014, Santosh Shilimkar wrote: > I remember NAKing this approach in past and my stand remains same. > The cache APIs which you are trying to use here are not suppose > to be used outside. > > I think the right way to fix this is to make use of streaming APIs. > If needed, IOMMU

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Santosh Shilimkar
On Friday 14 March 2014 12:38 PM, Laurent Pinchart wrote: > Hi Santosh, > > On Friday 14 March 2014 12:15:11 Santosh Shilimkar wrote: >> + Russell, Arnd >> >> On Thursday 13 March 2014 10:47 PM, Anna, Suman wrote: >>> On 03/07/2014 06:46 PM, Laurent Pinchart wrote: The page table entries must

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Santosh Shilimkar
+ Russell, Arnd On Thursday 13 March 2014 10:47 PM, Anna, Suman wrote: > Hi Laurent, > > On 03/07/2014 06:46 PM, Laurent Pinchart wrote: >> The page table entries must be cleaned from the cache before being >> accessed by the IOMMU. Instead of implementing cache management manually >> (and ignori

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Santosh Shilimkar
On Friday 14 March 2014 12:57 PM, Arnd Bergmann wrote: > On Friday 14 March 2014, Santosh Shilimkar wrote: >> I remember NAKing this approach in past and my stand remains same. >> The cache APIs which you are trying to use here are not suppose >> to be used outside. >> >> I think the right way to f

Re: [PATCH 5/5] iommu/omap: Fix map protection value handling

2014-03-14 Thread Suman Anna
Hi Laurent, On 03/14/2014 04:46 AM, Laurent Pinchart wrote: Hi Suman, Thank you for the review. On Thursday 13 March 2014 19:07:33 Suman Anna wrote: On 03/07/2014 06:46 PM, Laurent Pinchart wrote: The prot flags passed to the IOMMU map handler are defined in include/linux/iommu.h as IOMMU_(R

Re: [PATCH 3/5] iommu/omap: Flush the TLB only after updating translation table entries

2014-03-14 Thread Suman Anna
Hi Laurent, >> On 03/07/2014 06:46 PM, Laurent Pinchart wrote: Flushing the TLB before updating translation entries creates a race condition and can lead to stale TLB entries if a translation request arrives between flushing the TLB and updating the translation entries. As there's no requiremen

Re: [PATCH 1/5] iommu/omap: Use the cache cleaning API

2014-03-14 Thread Suman Anna
Hi Santosh, Laurent, Russell, Arnd, On 03/14/2014 12:51 PM, Santosh Shilimkar wrote: On Friday 14 March 2014 12:38 PM, Laurent Pinchart wrote: Hi Santosh, On Friday 14 March 2014 12:15:11 Santosh Shilimkar wrote: + Russell, Arnd On Thursday 13 March 2014 10:47 PM, Anna, Suman wrote: On 03/0

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

2014-03-14 Thread Grant Grundler
Please apply this. It's way overdue. It fixes customer kernel crashes we've seen in the field. I'd also advocate for seeing this be applied to stable kernels. thanks, grant On Thu, Mar 13, 2014 at 10:02 PM, Cho KyongHo wrote: > This commit adds cache flush for removed small and large page entr