aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-06-12 06:05:18 -0400
committerVineet Gupta <vgupta@synopsys.com>2013-06-22 04:16:42 -0400
commit6546415226f2fc3ab0a820464774e02a1679f90a (patch)
tree3fc965981100d163d5370996d7d98b75ff664f70 /arch/arc
parentda1677b02d3ef674dfd8a4ba1ed32153dc717fa2 (diff)
ARC: Reduce Code for ECR printing
Cause codes are same for D-TLB-Miss and Prot-V Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/kernel/troubleshoot.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/arc/kernel/troubleshoot.c b/arch/arc/kernel/troubleshoot.c
index 11c301b81c92..31a5d8905e1a 100644
--- a/arch/arc/kernel/troubleshoot.c
+++ b/arch/arc/kernel/troubleshoot.c
@@ -131,9 +131,9 @@ static void show_ecr_verbose(struct pt_regs *regs)
131 131
132 /* For DTLB Miss or ProtV, display the memory involved too */ 132 /* For DTLB Miss or ProtV, display the memory involved too */
133 if (vec == ECR_V_DTLB_MISS) { 133 if (vec == ECR_V_DTLB_MISS) {
134 pr_cont("Invalid %s 0x%08lx by insn @ 0x%08lx\n", 134 pr_cont("Invalid %s @ 0x%08lx by insn @ 0x%08lx\n",
135 (cause_code == 0x01) ? "Read From" : 135 (cause_code == 0x01) ? "Read" :
136 ((cause_code == 0x02) ? "Write to" : "EX"), 136 ((cause_code == 0x02) ? "Write" : "EX"),
137 address, regs->ret); 137 address, regs->ret);
138 } else if (vec == ECR_V_ITLB_MISS) { 138 } else if (vec == ECR_V_ITLB_MISS) {
139 pr_cont("Insn could not be fetched\n"); 139 pr_cont("Insn could not be fetched\n");
@@ -144,14 +144,12 @@ static void show_ecr_verbose(struct pt_regs *regs)
144 } else if (vec == ECR_V_PROTV) { 144 } else if (vec == ECR_V_PROTV) {
145 if (cause_code == ECR_C_PROTV_INST_FETCH) 145 if (cause_code == ECR_C_PROTV_INST_FETCH)
146 pr_cont("Execute from Non-exec Page\n"); 146 pr_cont("Execute from Non-exec Page\n");
147 else if (cause_code == ECR_C_PROTV_LOAD)
148 pr_cont("Read from Non-readable Page\n");
149 else if (cause_code == ECR_C_PROTV_STORE)
150 pr_cont("Write to Non-writable Page\n");
151 else if (cause_code == ECR_C_PROTV_XCHG)
152 pr_cont("Data exchange protection violation\n");
153 else if (cause_code == ECR_C_PROTV_MISALIG_DATA) 147 else if (cause_code == ECR_C_PROTV_MISALIG_DATA)
154 pr_cont("Misaligned r/w from 0x%08lx\n", address); 148 pr_cont("Misaligned r/w from 0x%08lx\n", address);
149 else
150 pr_cont("%s access not allowed on page\n",
151 (cause_code == 0x01) ? "Read" :
152 ((cause_code == 0x02) ? "Write" : "EX"));
155 } else if (vec == ECR_V_INSN_ERR) { 153 } else if (vec == ECR_V_INSN_ERR) {
156 pr_cont("Illegal Insn\n"); 154 pr_cont("Illegal Insn\n");
157 } else { 155 } else {