summaryrefslogtreecommitdiff
path: root/arch/arc/kernel/entry-arcv2.S
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-10-30 22:52:51 +0300
committerVineet Gupta <vgupta@synopsys.com>2015-11-14 10:42:20 +0300
commit541366da6a93f52f468b408ba24ab6bb5e4fd3d8 (patch)
treeed6db5d9c9272f7f5f5da71b50725304177e092e /arch/arc/kernel/entry-arcv2.S
parent76a8c40c65a2fc9e526fcba97c0cd1a6ecbd3438 (diff)
downloadlinux-541366da6a93f52f468b408ba24ab6bb5e4fd3d8.tar.xz
ARC: [arcompact] Handle bus error from userspace as Interrupt not exception
Bus errors from userspace on ARCompact based cores are handled by core as a high priority L2 interrupt but current code treated it as interrupt Handling an interrupt like exception is certainly not going to go unnoticed. (and it worked so far as we never saw a Bus error from userspace until IPPK guys tested a DDR controller with ECC error detection etc hence needed to explicitly trigger/handle such errors) - So move mem_service exception handler from common code into ARCv2 code. - In ARCompact code, define mem_service as L2 interrupt handler which just drops down to pure kernel mode and goes of to enqueue SIGBUS Reported-by: Nelson Pereira <npereira@synopsys.com> Tested-by: Ana Martins <amartins@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/entry-arcv2.S')
-rw-r--r--arch/arc/kernel/entry-arcv2.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arc/kernel/entry-arcv2.S b/arch/arc/kernel/entry-arcv2.S
index 445e63a10754..cbfec79137bf 100644
--- a/arch/arc/kernel/entry-arcv2.S
+++ b/arch/arc/kernel/entry-arcv2.S
@@ -91,6 +91,25 @@ ENTRY(EV_DCError)
flag 1
END(EV_DCError)
+; ---------------------------------------------
+; Memory Error Exception Handler
+; - Unlike ARCompact, handles Bus errors for both User/Kernel mode,
+; Instruction fetch or Data access, under a single Exception Vector
+; ---------------------------------------------
+
+ENTRY(mem_service)
+
+ EXCEPTION_PROLOGUE
+
+ lr r0, [efa]
+ mov r1, sp
+
+ FAKE_RET_FROM_EXCPN
+
+ bl do_memory_error
+ b ret_from_exception
+END(mem_service)
+
ENTRY(EV_Misaligned)
EXCEPTION_PROLOGUE