提交 37dd3818 编写于 作者: P Petri Gynther 提交者: Ralf Baechle

MIPS: traps: print Exception Code in __show_regs()

Print Exception Code when printing the Cause register.
Signed-off-by: NPetri Gynther <pgynther@google.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9998/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 26238994
...@@ -236,6 +236,7 @@ static void __show_regs(const struct pt_regs *regs) ...@@ -236,6 +236,7 @@ static void __show_regs(const struct pt_regs *regs)
{ {
const int field = 2 * sizeof(unsigned long); const int field = 2 * sizeof(unsigned long);
unsigned int cause = regs->cp0_cause; unsigned int cause = regs->cp0_cause;
unsigned int exccode;
int i; int i;
show_regs_print_info(KERN_DEFAULT); show_regs_print_info(KERN_DEFAULT);
...@@ -317,10 +318,10 @@ static void __show_regs(const struct pt_regs *regs) ...@@ -317,10 +318,10 @@ static void __show_regs(const struct pt_regs *regs)
} }
printk("\n"); printk("\n");
printk("Cause : %08x\n", cause); exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE;
printk("Cause : %08x (ExcCode %02x)\n", cause, exccode);
cause = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE; if (1 <= exccode && exccode <= 5)
if (1 <= cause && cause <= 5)
printk("BadVA : %0*lx\n", field, regs->cp0_badvaddr); printk("BadVA : %0*lx\n", field, regs->cp0_badvaddr);
printk("PrId : %08x (%s)\n", read_c0_prid(), printk("PrId : %08x (%s)\n", read_c0_prid(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册