Re: [PATCH] omap:iommu-added cache flushing operation for L2 cache

2011-03-02 Thread David Cohen
Hi,

On Tue, Mar 1, 2011 at 9:46 PM, Fernando Guzman Lugo
fernando.l...@ti.com wrote:
 From: Ramesh Gupta grgu...@ti.com

No patch body description at all?
Can we get at least something here?

Regards,

David


 Signed-off-by: Ramesh Gupta grgu...@ti.com
 Signed-off-by: Hari Kanigeri h-kanige...@ti.com
 ---
  arch/arm/plat-omap/iommu.c |   22 --
  1 files changed, 8 insertions(+), 14 deletions(-)

 diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
 index e3eb038..aeb2c33 100644
 --- a/arch/arm/plat-omap/iommu.c
 +++ b/arch/arm/plat-omap/iommu.c
 @@ -471,22 +471,15 @@ EXPORT_SYMBOL_GPL(foreach_iommu_device);
  */
  static void flush_iopgd_range(u32 *first, u32 *last)
  {
 -       /* FIXME: L2 cache should be taken care of if it exists */
 -       do {
 -               asm(mcr        p15, 0, %0, c7, c10, 1 @ flush_pgd
 -                   : : r (first));
 -               first += L1_CACHE_BYTES / sizeof(*first);
 -       } while (first = last);
 +       dmac_flush_range(first, last);
 +       outer_flush_range(virt_to_phys(first), virt_to_phys(last));
  }

 +
  static void flush_iopte_range(u32 *first, u32 *last)
  {
 -       /* FIXME: L2 cache should be taken care of if it exists */
 -       do {
 -               asm(mcr        p15, 0, %0, c7, c10, 1 @ flush_pte
 -                   : : r (first));
 -               first += L1_CACHE_BYTES / sizeof(*first);
 -       } while (first = last);
 +       dmac_flush_range(first, last);
 +       outer_flush_range(virt_to_phys(first), virt_to_phys(last));
  }

  static void iopte_free(u32 *iopte)
 @@ -750,7 +743,7 @@ size_t iopgtable_clear_entry(struct iommu *obj, u32 da)
  }
  EXPORT_SYMBOL_GPL(iopgtable_clear_entry);

 -static void iopgtable_clear_entry_all(struct iommu *obj)
 +void iopgtable_clear_entry_all(struct iommu *obj)
  {
        int i;

 @@ -777,7 +770,7 @@ static void iopgtable_clear_entry_all(struct iommu *obj)

        spin_unlock(obj-page_table_lock);
  }
 -
 +EXPORT_SYMBOL_GPL(iopgtable_clear_entry_all);
  /*
  *     Device IOMMU generic operations
  */
 @@ -1068,6 +1061,7 @@ static void iopte_cachep_ctor(void *iopte)
        clean_dcache_area(iopte, IOPTE_TABLE_SIZE);
  }

 +
  static int __init omap_iommu_init(void)
  {
        struct kmem_cache *p;
 --
 1.7.0.4

 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] omap:iommu-added cache flushing operation for L2 cache

2011-03-02 Thread Santosh Shilimkar
Hello,
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Fernando Guzman Lugo
 Sent: Wednesday, March 02, 2011 1:17 AM
 To: hiroshi.d...@nokia.com
 Cc: t...@atomide.com; li...@arm.linux.org.uk; linux-
 o...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; linux-
 ker...@vger.kernel.org; Ramesh Gupta; Hari Kanigeri
 Subject: [PATCH] omap:iommu-added cache flushing operation for L2
 cache

 From: Ramesh Gupta grgu...@ti.com

 Signed-off-by: Ramesh Gupta grgu...@ti.com
 Signed-off-by: Hari Kanigeri h-kanige...@ti.com
 ---
  arch/arm/plat-omap/iommu.c |   22 --
  1 files changed, 8 insertions(+), 14 deletions(-)

 diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
 index e3eb038..aeb2c33 100644
 --- a/arch/arm/plat-omap/iommu.c
 +++ b/arch/arm/plat-omap/iommu.c
 @@ -471,22 +471,15 @@ EXPORT_SYMBOL_GPL(foreach_iommu_device);
   */
  static void flush_iopgd_range(u32 *first, u32 *last)
  {
 - /* FIXME: L2 cache should be taken care of if it exists */
 - do {
 - asm(mcrp15, 0, %0, c7, c10, 1 @ flush_pgd
 - : : r (first));
 - first += L1_CACHE_BYTES / sizeof(*first);
 - } while (first = last);
 + dmac_flush_range(first, last);

There is note just above this API.
/*
 * These are private to the dma-mapping API.  Do not use directly.
 * Their sole purpose is to ensure that data held in the cache
 * is visible to DMA, or data written by DMA to system memory is
 * visible to the CPU.
 */
#define dmac_map_area   cpu_cache.dma_map_area
#define dmac_unmap_area cpu_cache.dma_unmap_area
#define dmac_flush_rangecpu_cache.dma_flush_range

 + outer_flush_range(virt_to_phys(first), virt_to_phys(last));
  }

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap:iommu-added cache flushing operation for L2 cache

2011-03-02 Thread Gupta, Ramesh
Hi Santosh,

On Wed, Mar 2, 2011 at 6:48 AM, Santosh Shilimkar
santosh.shilim...@ti.com wrote:
 Hello,
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Fernando Guzman Lugo
 Sent: Wednesday, March 02, 2011 1:17 AM
 To: hiroshi.d...@nokia.com
 Cc: t...@atomide.com; li...@arm.linux.org.uk; linux-
 o...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; linux-
 ker...@vger.kernel.org; Ramesh Gupta; Hari Kanigeri
 Subject: [PATCH] omap:iommu-added cache flushing operation for L2
 cache

 From: Ramesh Gupta grgu...@ti.com

 Signed-off-by: Ramesh Gupta grgu...@ti.com
 Signed-off-by: Hari Kanigeri h-kanige...@ti.com
 ---
  arch/arm/plat-omap/iommu.c |   22 --
  1 files changed, 8 insertions(+), 14 deletions(-)

 diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
 index e3eb038..aeb2c33 100644
 --- a/arch/arm/plat-omap/iommu.c
 +++ b/arch/arm/plat-omap/iommu.c
 @@ -471,22 +471,15 @@ EXPORT_SYMBOL_GPL(foreach_iommu_device);
   */
  static void flush_iopgd_range(u32 *first, u32 *last)
  {
 -     /* FIXME: L2 cache should be taken care of if it exists */
 -     do {
 -             asm(mcr        p15, 0, %0, c7, c10, 1 @ flush_pgd
 -                 : : r (first));
 -             first += L1_CACHE_BYTES / sizeof(*first);
 -     } while (first = last);
 +     dmac_flush_range(first, last);

 There is note just above this API.

Thank you for your inputs. I agree, I will send an updated patch with
proper apis.

regards
Ramesh Gupta G
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap:iommu-added cache flushing operation for L2 cache

2011-03-02 Thread Gupta, Ramesh
David,

On Wed, Mar 2, 2011 at 5:58 AM, David Cohen daco...@gmail.com wrote:
 Hi,

 On Tue, Mar 1, 2011 at 9:46 PM, Fernando Guzman Lugo
 fernando.l...@ti.com wrote:
 From: Ramesh Gupta grgu...@ti.com

 No patch body description at all?
 Can we get at least something here?

My apologies, I will be sending an updated patch
with description.

regards
Ramesh Gupta G
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html