arm64: Use PoU cache instr for I/D coherency
authorAshok Kumar <ashoks@broadcom.com>
Thu, 17 Dec 2015 09:38:32 +0000 (01:38 -0800)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 08:59:42 +0000 (16:59 +0800)
commit358e3c80a223c4d79a786be2e71e51cab91c2e7e
tree95eed77e736e32e4b3a7f58d1bad15abf00cccfc
parentac7406c28c8bada863d36c46ca246bb7b76f3e9f
arm64: Use PoU cache instr for I/D coherency

In systems with three levels of cache(PoU at L1 and PoC at L3),
PoC cache flush instructions flushes L2 and L3 caches which could affect
performance.
For cache flushes for I and D coherency, PoU should suffice.
So changing all I and D coherency related cache flushes to PoU.

Introduced a new __clean_dcache_area_pou API for dcache flush till PoU
and provided a common macro for __flush_dcache_area and
__clean_dcache_area_pou.

Also, now in __sync_icache_dcache, icache invalidation for non-aliasing
VIPT icache is done only for that particular page instead of the earlier
__flush_icache_all.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ashok Kumar <ashoks@broadcom.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 0a28714c53fd4f7aea709be7577dfbe0095c8c3e)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
included reset_pmuserenr_el0 in arch/arm64/mm/proc-macros.S
arch/arm64/include/asm/cacheflush.h
arch/arm64/mm/cache.S
arch/arm64/mm/flush.c
arch/arm64/mm/proc-macros.S