lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/2] OMAP:IOMMU:flush L1 and L2 caches
On Wed, Sep 12, 2012 at 08:49:16PM +0530, Gupta, Ramesh wrote:
> Thanks to the RMK's suggestions.

I should've made clear the distinction between _range and _area.
A _range function takes start and end. An _area function takes a start
and size. So...

> -static void flush_iopgd_range(u32 *first, u32 *last)
> +static void flush_iopgd_range(u32 *first, size_t size)

This should change to flush_iopgd_area().

> {
> - /* 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);
> + phys_addr_t phys = virt_to_phys(first);
> +
> + iommu_flush_area(first, size);
> + outer_flush_range(phys, phys + size);
> }
>
> -static void flush_iopte_range(u32 *first, u32 *last)
> +static void flush_iopte_range(u32 *first, size_t size)
> +

flush_iopte_area(). (And there shouldn't be a blank line between this
and the open curley.)

Otherwise, looks fine.


\
 
 \ /
  Last update: 2012-09-12 19:21    [W:0.077 / U:4.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site