[PATCH 2/4] MIPS: Don't dump CM error state for fixed up bus errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If a bus error has a fixup then this implies that it is somewhat
expected. Therefore avoid printing out CM error state when a fixup
exists.

One case in which user code can trigger this is performing unaligned
accesses to the GIC user page, which the kernel then attempts to emulate
with byte sized memory accesses that trigger bus errors. These are fixed
up and ultimately harmless, so spamming the kernel log with CM error
information for these cases seems inappropriate.

Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx>
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
---

 arch/mips/kernel/traps.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index e7190e5ae427..259e2d259204 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -449,11 +449,10 @@ asmlinkage void do_be(struct pt_regs *regs)
 	if (data && !user_mode(regs))
 		fixup = search_dbe_tables(exception_epc(regs));
 
-	if (fixup)
-		action = MIPS_BE_FIXUP;
-
 	if (board_be_handler)
 		action = board_be_handler(regs, fixup != NULL);
+	else if (fixup)
+		action = MIPS_BE_FIXUP;
 	else
 		mips_cm_error_report();
 
-- 
2.14.1



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux