diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2015-07-10 11:29:10 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-07-10 11:59:16 +0300 |
commit | cccf34e9411c41b0cbfb41980fe55fc8e7c98fd2 (patch) | |
tree | 7e210c9313ddac303a47a6b527935f4b00ee3fa7 /arch/mips/include/asm/smp.h | |
parent | 1c885357da2d3cf62132e611c0beaf4cdf607dd9 (diff) | |
download | linux-cccf34e9411c41b0cbfb41980fe55fc8e7c98fd2.tar.xz |
MIPS: c-r4k: Fix cache flushing for MT cores
MT_SMP is not the only SMP option for MT cores. The MT_SMP option
allows more than one VPE per core to appear as a secondary CPU in the
system. Because of how CM works, it propagates the address-based
cache ops to the secondary cores but not the index-based ones.
Because of that, the code does not use IPIs to flush the L1 caches on
secondary cores because the CM would have done that already. However,
the CM functionality is independent of the type of SMP kernel so even in
non-MT kernels, IPIs are not necessary. As a result of which, we change
the conditional to depend on the CM presence. Moreover, since VPEs on
the same core share the same L1 caches, there is no need to send an
IPI on all of them so we calculate a suitable cpumask with only one
VPE per core.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: <stable@vger.kernel.org> # 3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10654/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/smp.h')
-rw-r--r-- | arch/mips/include/asm/smp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index 2b25d1ba1ea0..16f1ea9ab191 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h @@ -23,6 +23,7 @@ extern int smp_num_siblings; extern cpumask_t cpu_sibling_map[]; extern cpumask_t cpu_core_map[]; +extern cpumask_t cpu_foreign_map; #define raw_smp_processor_id() (current_thread_info()->cpu) |