diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-04-11 15:06:35 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-05-07 15:38:12 +0200 |
commit | 24603fdd19d978fcc0d089d92370ee1aa3a71e84 (patch) | |
tree | 8871ebc44c1b569dce1a394eb290f2912066cc52 /arch/arc/include | |
parent | ARC: [mm] optimize needless full mm TLB flush on munmap (diff) | |
download | linux-24603fdd19d978fcc0d089d92370ee1aa3a71e84.tar.xz linux-24603fdd19d978fcc0d089d92370ee1aa3a71e84.zip |
ARC: [mm] optimise icache flush for user mappings
ARC icache doesn't snoop dcache thus executable pages need to be made
coherent before mapping into userspace in flush_icache_page().
However ARC700 CDU (hardware cache flush module) requires both vaddr
(index in cache) as well as paddr (tag match) to correctly identify a
line in the VIPT cache. A typical ARC700 SoC has aliasing icache, thus
the paddr only based flush_icache_page() API couldn't be implemented
efficiently. It had to loop thru all possible alias indexes and perform
the invalidate operation (ofcourse the cache op would only succeed at
the index(es) where tag matches - typically only 1, but the cost of
visiting all the cache-bins needs to paid nevertheless).
Turns out however that the vaddr (along with paddr) is available in
update_mmu_cache() hence better suits ARC icache flush semantics.
With both vaddr+paddr, exactly one flush operation per line is done.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/cacheflush.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arc/include/asm/cacheflush.h b/arch/arc/include/asm/cacheflush.h index 97ee96f26505..46f13e7314dc 100644 --- a/arch/arc/include/asm/cacheflush.h +++ b/arch/arc/include/asm/cacheflush.h @@ -20,12 +20,20 @@ #include <linux/mm.h> +/* + * Semantically we need this because icache doesn't snoop dcache/dma. + * However ARC Cache flush requires paddr as well as vaddr, latter not available + * in the flush_icache_page() API. So we no-op it but do the equivalent work + * in update_mmu_cache() + */ +#define flush_icache_page(vma, page) + void flush_cache_all(void); void flush_icache_range(unsigned long start, unsigned long end); -void flush_icache_page(struct vm_area_struct *vma, struct page *page); void flush_icache_range_vaddr(unsigned long paddr, unsigned long u_vaddr, int len); +void __inv_icache_page(unsigned long paddr, unsigned long vaddr); #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 |