diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2023-04-04 12:33:45 +0300 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2023-04-05 10:45:09 +0300 |
commit | 6e90049162b92e683641966e4cdc67febe3c8fc5 (patch) | |
tree | 48867fada3ecfe8ff825c8725a86a0f7da78381e | |
parent | f641519409a73403ee6612b8648b95a688ab85c2 (diff) | |
download | linux-6e90049162b92e683641966e4cdc67febe3c8fc5.tar.xz |
MIPS: c-octeon: Provide alternative SMP cache flush function
Currently c-octeon relies on octeon's own smp function to flush
I-Cache. However this function is not available on generic platform.
Just use smp_call_function_many on generic platform.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
-rw-r--r-- | arch/mips/mm/c-octeon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index c7ed589de882..b7393b61cfa7 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c @@ -83,8 +83,13 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma) else mask = *cpu_online_mask; cpumask_clear_cpu(cpu, &mask); +#ifdef CONFIG_CAVIUM_OCTEON_SOC for_each_cpu(cpu, &mask) octeon_send_ipi_single(cpu, SMP_ICACHE_FLUSH); +#else + smp_call_function_many(&mask, (smp_call_func_t)octeon_local_flush_icache, + NULL, 1); +#endif preempt_enable(); #endif |