Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Fix decoding of c0_config1 for MIPSxx caches with 32 ways per set.

This affects certain 4Kc cores.

Signed-off-by: Douglas Leung <douglas@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3855/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Douglas Leung and committed by
Ralf Baechle
dc34b05f c0226306

+2 -2
+2 -2
arch/mips/mm/c-r4k.c
··· 977 977 c->icache.linesz = 2 << lsize; 978 978 else 979 979 c->icache.linesz = lsize; 980 - c->icache.sets = 64 << ((config1 >> 22) & 7); 980 + c->icache.sets = 32 << (((config1 >> 22) + 1) & 7); 981 981 c->icache.ways = 1 + ((config1 >> 16) & 7); 982 982 983 983 icache_size = c->icache.sets * ··· 997 997 c->dcache.linesz = 2 << lsize; 998 998 else 999 999 c->dcache.linesz= lsize; 1000 - c->dcache.sets = 64 << ((config1 >> 13) & 7); 1000 + c->dcache.sets = 32 << (((config1 >> 13) + 1) & 7); 1001 1001 c->dcache.ways = 1 + ((config1 >> 7) & 7); 1002 1002 1003 1003 dcache_size = c->dcache.sets *