diff options
author | Guo Ren <guoren@linux.alibaba.com> | 2020-01-31 15:33:10 +0300 |
---|---|---|
committer | Guo Ren <guoren@linux.alibaba.com> | 2020-02-21 10:43:24 +0300 |
commit | 997153b9a75c08d545ad45e6f8ceb432435d2425 (patch) | |
tree | 830915f73d05e7d094d2f293a712e05c0da1e6f5 /arch/csky/mm | |
parent | cc1f6563a92ced0889775d0587316d725b6e1a68 (diff) | |
download | linux-997153b9a75c08d545ad45e6f8ceb432435d2425.tar.xz |
csky: Add flush_icache_mm to defer flush icache all
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>
Diffstat (limited to 'arch/csky/mm')
-rw-r--r-- | arch/csky/mm/syscache.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/csky/mm/syscache.c b/arch/csky/mm/syscache.c index c4645e4e97f4..ffade2f9a4c8 100644 --- a/arch/csky/mm/syscache.c +++ b/arch/csky/mm/syscache.c @@ -3,7 +3,7 @@ #include <linux/syscalls.h> #include <asm/page.h> -#include <asm/cache.h> +#include <asm/cacheflush.h> #include <asm/cachectl.h> SYSCALL_DEFINE3(cacheflush, @@ -13,17 +13,14 @@ SYSCALL_DEFINE3(cacheflush, { switch (cache) { case ICACHE: - icache_inv_range((unsigned long)addr, - (unsigned long)addr + bytes); - break; + case BCACHE: + flush_icache_mm_range(current->mm, + (unsigned long)addr, + (unsigned long)addr + bytes); case DCACHE: dcache_wb_range((unsigned long)addr, (unsigned long)addr + bytes); break; - case BCACHE: - cache_wbinv_range((unsigned long)addr, - (unsigned long)addr + bytes); - break; default: return -EINVAL; } |