MIPS: Don't read GCRs when a CM is not present
authorPaul Burton <paul.burton@imgtec.com>
Tue, 22 Sep 2015 17:26:38 +0000 (10:26 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 26 Oct 2015 08:49:46 +0000 (09:49 +0100)
commit03b1b85d3d6c4f4153472afb7e015f1352e0c8f2
treecf205e231c93d84f9b330aa5e7196f0378feea58
parent7784494ae7864a112d4858b2b494e0358ec412a1
MIPS: Don't read GCRs when a CM is not present

Commit 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache
errors") leads to Malta boards unconditionally reading CM GCRs upon bus
errors, regardless of whether a CM is present. This is incorrect & will
lead to further exceptions. Fix by moving the GCR reads to after the
check for whether a CM is present.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11186/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/mips-cm.c