]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
MIPS: c-r4k: Treat physically indexed dcaches as not aliasing
authorPaul Burton <paul.burton@imgtec.com>
Fri, 19 Aug 2016 17:13:35 +0000 (18:13 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:48:40 +0000 (16:48 +0100)
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>
arch/mips/mm/c-r4k.c

index 86f21391eb0976a12078586d581713b2fb397034..e7f798d55fbcca06eaa0fe07a6822c3aedd18cc8 100644 (file)
@@ -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:
                /*