mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
MIPS: Set MIPS_IC_SNOOPS_REMOTE for systems with CM
In systems that include a MIPS Coherency Manager, the icache always fills from a cache which is coherent across all CPUs. In I6400 & I6500 systems the icache fills from the dcache which is coherent across all CPUs. In all other CM-based systems the icache fills from the L2 cache which is shared between all cores. This means that an icache will always see stores from remote CPUs without needing to write them back any further than that L2, which is what the cpu_icache_snoops_remote_store feature is used to test. In order for it to return 1 without needing a per-platform override (which is what Malta has relied upon so far) set the MIPS_IC_SNOOPS_REMOTE flag when a CM is present. Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16200/
This commit is contained in:
parent
8fd2d6ea66
commit
d1c5872ce1
1 changed files with 8 additions and 0 deletions
|
@ -1505,6 +1505,14 @@ static void probe_pcache(void)
|
|||
if (c->dcache.flags & MIPS_CACHE_PINDEX)
|
||||
c->dcache.flags &= ~MIPS_CACHE_ALIASES;
|
||||
|
||||
/*
|
||||
* In systems with CM the icache fills from L2 or closer caches, and
|
||||
* thus sees remote stores without needing to write them back any
|
||||
* further than that.
|
||||
*/
|
||||
if (mips_cm_present())
|
||||
c->icache.flags |= MIPS_IC_SNOOPS_REMOTE;
|
||||
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_20KC:
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue