diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-08-19 18:13:35 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-03 16:48:40 +0100 |
commit | d66f99bc46925831236cf2335fcc6087d34e2195 (patch) | |
tree | 299bc1d9dfee316bd8ab757a46489f1634f36680 /arch | |
parent | 819da1ead13621edd4f05df730651cf5b623de7e (diff) | |
download | linux-stable-d66f99bc46925831236cf2335fcc6087d34e2195.tar.gz linux-stable-d66f99bc46925831236cf2335fcc6087d34e2195.tar.bz2 linux-stable-d66f99bc46925831236cf2335fcc6087d34e2195.zip |
MIPS: c-r4k: Treat physically indexed dcaches as not aliasing
Physically indexed caches cannot suffer from virtual aliasing, so clear
the MIPS_CACHE_ALIASES bit in order to ensure we don't do extra work
avoiding aliasing that cannot happen.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14017/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 86f21391eb09..e7f798d55fbc 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -1497,6 +1497,10 @@ static void probe_pcache(void) c->dcache.flags |= MIPS_CACHE_ALIASES; } + /* Physically indexed caches don't suffer from virtual aliasing */ + if (c->dcache.flags & MIPS_CACHE_PINDEX) + c->dcache.flags &= ~MIPS_CACHE_ALIASES; + switch (current_cpu_type()) { case CPU_20KC: /* |