]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: [mm] optimise icache flush for user mappings
authorVineet Gupta <vgupta@synopsys.com>
Thu, 11 Apr 2013 13:06:35 +0000 (18:36 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 7 May 2013 13:38:12 +0000 (19:08 +0530)
commitdadf3583d31e45c6ad906c09eeb832e98999f430
tree8871ebc44c1b569dce1a394eb290f2912066cc52
parent246c773ecac9d890e486d9737a7cbdcdb450421b
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>
arch/arc/include/asm/cacheflush.h
arch/arc/mm/cache_arc700.c
arch/arc/mm/tlb.c