]> err.no Git - linux-2.6/commitdiff
[PATCH] powerpc: Nicer printing of address at oops
authorOlof Johansson <olof@lixom.net>
Sun, 6 Nov 2005 22:54:36 +0000 (14:54 -0800)
committerPaul Mackerras <paulus@samba.org>
Mon, 7 Nov 2005 01:37:28 +0000 (12:37 +1100)
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>
arch/powerpc/mm/fault.c

index 841d8b6323a8da26699086273bb4560514bc85f8..93d4fbfdb724a137ee6ab385d880e79e80795f75 100644 (file)
@@ -389,5 +389,22 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
        }
 
        /* kernel has accessed a bad area */
+
+       printk(KERN_ALERT "Unable to handle kernel paging request for ");
+       switch (regs->trap) {
+               case 0x300:
+               case 0x380:
+                       printk("data at address 0x%08lx\n", regs->dar);
+                       break;
+               case 0x400:
+               case 0x480:
+                       printk("instruction fetch\n");
+                       break;
+               default:
+                       printk("unknown fault\n");
+       }
+       printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
+               regs->nip);
+
        die("Kernel access of bad area", regs, sig);
 }