Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiaxun Yang and committed by
Thomas Bogendoerfer
6e900491 f6415194

+5
+5
arch/mips/mm/c-octeon.c
··· 83 83 else 84 84 mask = *cpu_online_mask; 85 85 cpumask_clear_cpu(cpu, &mask); 86 + #ifdef CONFIG_CAVIUM_OCTEON_SOC 86 87 for_each_cpu(cpu, &mask) 87 88 octeon_send_ipi_single(cpu, SMP_ICACHE_FLUSH); 89 + #else 90 + smp_call_function_many(&mask, (smp_call_func_t)octeon_local_flush_icache, 91 + NULL, 1); 92 + #endif 88 93 89 94 preempt_enable(); 90 95 #endif