diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2017-08-29 05:14:20 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2017-09-01 14:26:29 -0400 |
commit | aa7e3a5e8b63628c7fc131effc163ade08ced41b (patch) | |
tree | a831af6cd0134d6bed0c6a7619a74fb624d6d1a4 | |
parent | a518d63777a4e94e4b2dd86501604ec49ffe86b2 (diff) |
ARC: Show fault information passed to show_kernel_fault_diag()
Currently we pass a string argument to show_kernel_fault_diag() which
describes the reason for the fault. This is not being used so just
add a pr_info() which outputs the fault information.
With this change we get from:
|
| Path: /bin/busybox
| CPU: 0 PID: 92 Comm: modprobe Not tainted 4.12.0-rc6 #30
| task: 9a254780 task.stack: 9a212000
|
| [ECR ]: 0x00200400 => Other Fatal Err
|
to:
|
| Unhandled Machine Check Exception
| Path: /bin/busybox
| CPU: 0 PID: 92 Comm: modprobe Not tainted 4.12.0-rc6 #37
| task: 9a240780 task.stack: 9a226000
|
|[ECR ]: 0x00200400 => Machine Check (Other Fatal Err)
|
Which can help debugging.
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/arc/kernel/troubleshoot.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c index 62675b94fccd..bcd7c9fc5d0f 100644 --- a/arch/arc/kernel/traps.c +++ b/arch/arc/kernel/traps.c | |||
@@ -103,7 +103,7 @@ int do_misaligned_access(unsigned long address, struct pt_regs *regs, | |||
103 | */ | 103 | */ |
104 | void do_machine_check_fault(unsigned long address, struct pt_regs *regs) | 104 | void do_machine_check_fault(unsigned long address, struct pt_regs *regs) |
105 | { | 105 | { |
106 | die("Machine Check Exception", regs, address); | 106 | die("Unhandled Machine Check Exception", regs, address); |
107 | } | 107 | } |
108 | 108 | ||
109 | 109 | ||
diff --git a/arch/arc/kernel/troubleshoot.c b/arch/arc/kernel/troubleshoot.c index f9caf79186d4..7e94476f3994 100644 --- a/arch/arc/kernel/troubleshoot.c +++ b/arch/arc/kernel/troubleshoot.c | |||
@@ -140,7 +140,7 @@ static void show_ecr_verbose(struct pt_regs *regs) | |||
140 | } else if (vec == ECR_V_ITLB_MISS) { | 140 | } else if (vec == ECR_V_ITLB_MISS) { |
141 | pr_cont("Insn could not be fetched\n"); | 141 | pr_cont("Insn could not be fetched\n"); |
142 | } else if (vec == ECR_V_MACH_CHK) { | 142 | } else if (vec == ECR_V_MACH_CHK) { |
143 | pr_cont("%s\n", (cause_code == 0x0) ? | 143 | pr_cont("Machine Check (%s)\n", (cause_code == 0x0) ? |
144 | "Double Fault" : "Other Fatal Err"); | 144 | "Double Fault" : "Other Fatal Err"); |
145 | 145 | ||
146 | } else if (vec == ECR_V_PROTV) { | 146 | } else if (vec == ECR_V_PROTV) { |
@@ -233,6 +233,9 @@ void show_kernel_fault_diag(const char *str, struct pt_regs *regs, | |||
233 | { | 233 | { |
234 | current->thread.fault_address = address; | 234 | current->thread.fault_address = address; |
235 | 235 | ||
236 | /* Show fault description */ | ||
237 | pr_info("\n%s\n", str); | ||
238 | |||
236 | /* Caller and Callee regs */ | 239 | /* Caller and Callee regs */ |
237 | show_regs(regs); | 240 | show_regs(regs); |
238 | 241 | ||