14a10ba147bd36b0f34aa56be9d51d3ed666e46b
[openwrt/staging/wigyori.git] / target / linux / generic / patches-4.4 / 100-MIPS-fix-MT_SMP-cacheflush.patch
1 Fix crash on cache flush with the MT_SMP variant
2
3 Signed-off-by: Felix Fietkau <nbd@nbd.name>
4
5 --- a/arch/mips/mm/c-r4k.c
6 +++ b/arch/mips/mm/c-r4k.c
7 @@ -60,8 +60,10 @@ static inline void r4k_on_each_cpu(void
8 * to restrict that call when a CM is not present because both
9 * CM-based SMP protocols (CMP & CPS) restrict index-based cache ops.
10 */
11 +#ifndef CONFIG_MIPS_MT_SMP
12 if (!mips_cm_present())
13 smp_call_function_many(&cpu_foreign_map, func, info, 1);
14 +#endif
15 func(info);
16 preempt_enable();
17 }