diff options
author | Noam Camus <[email protected]> | 2017-06-13 17:03:45 +0300 |
---|---|---|
committer | Vineet Gupta <[email protected]> | 2017-08-28 15:17:36 -0700 |
commit | 983394959f5edff6b39bcd10317badaaf33efa99 (patch) | |
tree | 40493ca158134c5f1a553e9f1985dd64e69b3b60 /arch/arc/kernel/traps.c | |
parent | 644fa02b392e25d7592951da2b2b64b4d533d1be (diff) |
ARC: [plat-eznps] Handle user memory error same in simulation and silicon
On ARC700 (and nSIM), user mode memory error triggers an L2 interrupt
which is handled gracefully by kernel (or it tries to despite this being
imprecise, and error could get charged to kernel itself). The offending
task is killed and kernel moves on.
NPS hardware however raises a Machine Check exception for same error
which is NOT recoverable by kernel.
This patch aligns kernel handling for nSIM case, to same as hardware by
overriding the default user space bus error handler.
Signed-off-by: Noam Camus <[email protected]>
Signed-off-by: Elad Kanfi <[email protected]>
[vgupta: rewrote changelog]
Signed-off-by: Vineet Gupta <[email protected]>
Diffstat (limited to 'arch/arc/kernel/traps.c')
-rw-r--r-- | arch/arc/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c index ff83e78d0cfb..62675b94fccd 100644 --- a/arch/arc/kernel/traps.c +++ b/arch/arc/kernel/traps.c @@ -80,7 +80,7 @@ int name(unsigned long address, struct pt_regs *regs) \ DO_ERROR_INFO(SIGILL, "Priv Op/Disabled Extn", do_privilege_fault, ILL_PRVOPC) DO_ERROR_INFO(SIGILL, "Invalid Extn Insn", do_extension_fault, ILL_ILLOPC) DO_ERROR_INFO(SIGILL, "Illegal Insn (or Seq)", insterror_is_error, ILL_ILLOPC) -DO_ERROR_INFO(SIGBUS, "Invalid Mem Access", do_memory_error, BUS_ADRERR) +DO_ERROR_INFO(SIGBUS, "Invalid Mem Access", __weak do_memory_error, BUS_ADRERR) DO_ERROR_INFO(SIGTRAP, "Breakpoint Set", trap_is_brkpt, TRAP_BRKPT) DO_ERROR_INFO(SIGBUS, "Misaligned Access", do_misaligned_error, BUS_ADRALN) |