aboutsummaryrefslogtreecommitdiff
path: root/arch/csky/abiv1/cacheflush.c
AgeCommit message (Collapse)AuthorFilesLines
2019-08-22csky: Fixup 610 vipt cache flush mechanismGuo Ren1-0/+20
610 has vipt aliasing issue, so we need to finish the cache flush apis mentioned in cachetlb.rst to avoid data corruption. Here is the list of modified apis in the patch: - flush_kernel_dcache_page (new add) - flush_dcache_mmap_lock (new add) - flush_dcache_mmap_unlock (new add) - flush_kernel_vmap_range (new add) - invalidate_kernel_vmap_range (new add) - flush_anon_page (new add) - flush_cache_range (new add) - flush_cache_vmap (flush all) - flush_cache_vunmap (flush all) - flush_cache_mm (only dcache flush) - flush_icache_page (just nop) - copy_from_user_page (remove no need flush) - copy_to_user_page (remove no need flush) Change to V2: - Fixup compile error with xa_lock*(&mapping->i_pages) Signed-off-by: Guo Ren <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Christoph Hellwig <[email protected]>
2019-08-20csky: Fixup defer cache flush for 610Guo Ren1-23/+27
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 <[email protected]> Cc: Arnd Bergmann <[email protected]>
2018-10-25csky: Cache and TLB routinesGuo Ren1-0/+52
This patch adds cache and tlb sync codes for abiv1 & abiv2. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>