MIPS: traps: Ensure L1 & L2 ECC checking match for CM3 systems
authorPaul Burton <paul.burton@imgtec.com>
Mon, 17 Oct 2016 15:01:07 +0000 (16:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:23:28 +0000 (09:23 +0100)
commitade4b22d47bbd8f48f18bd2decac8efe6245b528
tree33ce18c509f52fd16153ff37a7ab824e89936ea8
parent73b6038950cdfede71a0b2137aeb44f70f7eae55
MIPS: traps: Ensure L1 & L2 ECC checking match for CM3 systems

[ Upstream commit 35e6de38858f59b6b65dcfeaf700b5d06fc2b93d ]

On systems with CM3, we must ensure that the L1 & L2 ECC enables are set
to the same value. This is presumed by the hardware & cache corruption
can occur when it is not the case. Support enabling & disabling the L2
ECC checking on CM3 systems where this is controlled via a GCR, and
ensure that it matches the state of L1 ECC checking. Remove I6400 from
the switch statement it will no longer hit, and which was incorrect
since the L2 ECC enable bit isn't in the CP0 ErrCtl register.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14413/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/include/asm/mips-cm.h
arch/mips/kernel/traps.c