Commit 723925b7b138cecb29d76169d20149255d354a7a

Authored by Olof Johansson
Committed by Paul Mackerras
1 parent 55b6332ec8

[PATCH] powerpc: Nicer printing of address at oops

Add nicer printing of faulting address on unresolvable kernel faults.

Makes life a little easier for those who don't know how to decode our
register contents at oops time.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Showing 1 changed file with 17 additions and 0 deletions Side-by-side Diff

arch/powerpc/mm/fault.c
... ... @@ -389,6 +389,23 @@
389 389 }
390 390  
391 391 /* kernel has accessed a bad area */
  392 +
  393 + printk(KERN_ALERT "Unable to handle kernel paging request for ");
  394 + switch (regs->trap) {
  395 + case 0x300:
  396 + case 0x380:
  397 + printk("data at address 0x%08lx\n", regs->dar);
  398 + break;
  399 + case 0x400:
  400 + case 0x480:
  401 + printk("instruction fetch\n");
  402 + break;
  403 + default:
  404 + printk("unknown fault\n");
  405 + }
  406 + printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
  407 + regs->nip);
  408 +
392 409 die("Kernel access of bad area", regs, sig);
393 410 }