diff options
author | Olof Johansson <olof@lixom.net> | 2005-11-06 14:54:36 -0800 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-07 12:37:28 +1100 |
commit | 723925b7b138cecb29d76169d20149255d354a7a (patch) | |
tree | 3eea7faa1c23c050c0a3d0ff173ee63f77307888 /arch | |
parent | 55b6332ec89a5fc65d1287708cfd9f06f7a88b90 (diff) | |
download | blackbird-obmc-linux-723925b7b138cecb29d76169d20149255d354a7a.tar.gz blackbird-obmc-linux-723925b7b138cecb29d76169d20149255d354a7a.zip |
[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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/mm/fault.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 841d8b6323a8..93d4fbfdb724 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -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); } |