]> git.baikalelectronics.ru Git - kernel.git/commit
csky: Fixup defer cache flush for 610
authorGuo Ren <ren_guo@c-sky.com>
Tue, 20 Aug 2019 04:47:24 +0000 (12:47 +0800)
committerGuo Ren <ren_guo@c-sky.com>
Tue, 20 Aug 2019 12:09:14 +0000 (20:09 +0800)
commit8680e3e1bd7d824cbd8212e464eee56ce601a2d2
treebef3a506c2b97019e8ad3b4aabae6239be02e953
parentf2ac8cf998c99eb54eed0479339552d91d0b64d3
csky: Fixup defer cache flush for 610

We use defer cache flush mechanism to improve the performance of
610, but the implementation is wrong. We fix it up now and update
the mechanism:

 - Zero page needn't be flushed.
 - If page is file mapping & non-touched in user space, defer flush.
 - If page is anon mapping or dirty file mapping, flush immediately.
 - In update_mmu_cache finish the defer flush by flush_dcache_page().

For 610 we need take care the dcache aliasing issue:
 - VIPT cache with 8K-bytes size per way in 4K page granularity.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Cc: Arnd Bergmann <arnd@arndb.de>
arch/csky/abiv1/cacheflush.c
arch/csky/abiv1/inc/abi/cacheflush.h