summaryrefslogtreecommitdiffstats
path: root/arch/csky/abiv2/cacheflush.c
Commit message (Collapse)AuthorAgeFilesLines
* csky: Fixup update_mmu_cache called with user io mappingGuo Ren2021-01-121-0/+3
| | | | | | | | The function update_mmu_cache could be called by user-io mapping. There is no space of struct page in mem_map for the pte. Just ignore the user-io mmaping in update_mmu_cache. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
* csky: Add flush_icache_mm to defer flush icache allGuo Ren2020-02-211-0/+55
| | | | | | | | | Some CPUs don't support icache.va instruction to maintain the whole smp cores' icache. Using icache.all + IPI casue a lot on performace and using defer mechanism could reduce the number of calling icache _flush_all functions. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
* csky: Enable defer flush_dcache_page for abiv2 cpus (807/810/860)Guo Ren2020-02-211-6/+8
| | | | | | | | | | | Instead of flushing cache per update_mmu_cache() called, we use flush_dcache_page to reduce the frequency of flashing the cache. As abiv2 cpus are all PIPT for icache & dcache, we needn't handle dcache aliasing problem. But their icache can't snoop dcache, so we still need sync_icache_dcache in update_mmu_cache(). Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
* csky: Remove unnecessary flush_icache_* implementationGuo Ren2020-02-211-23/+0
| | | | | | | | | | | | | The abiv2 CPUs are all PIPT cache, so there is no need to implement flush_icache_page function. The function flush_icache_user_range hasn't been used, so just remove it. The function flush_cache_range is not necessary for PIPT cache when tlb mapping changed. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
* csky: Fixup wrong update_mmu_cache implementationGuo Ren2019-04-221-11/+2
| | | | | | | | | | | | | | | | | | | In our stress test, we found some crash problem caused by: if (!(vma->vm_flags & VM_EXEC)) return; in update_mmu_cache(). Seems current update_mmu_cache implementation is wrong and we retread to the conservative implementation. Also the usage of kmap_atomic in update_mmu_cache is risky, page-virtual may be scheduled out and changed, so we must use preempt_disable & pagefault_disable which is called by kmap_atomic(). Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Arnd Bergmann <arnd@arndb.de>
* csky: Cache and TLB routinesGuo Ren2018-10-251-0/+60
This patch adds cache and tlb sync codes for abiv1 & abiv2. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de>