Blackfin arch: print out modules that are loaded if we get a kernel oops
[pandora-kernel.git] / arch / blackfin / kernel / traps.c
index cfa0543..1a72a80 100644 (file)
@@ -158,7 +158,7 @@ static void decode_address(char *buf, unsigned long address)
        }
 
        /* we were unable to find this address anywhere */
-       sprintf(buf, "[<0x%p>]", (void *)address);
+       sprintf(buf, "<0x%p> /* unknown address */", (void *)address);
 
 done:
        write_unlock_irqrestore(&tasklist_lock, flags);
@@ -311,11 +311,10 @@ asmlinkage void trap_c(struct pt_regs *fp)
                printk(KERN_NOTICE EXC_0x22);
                CHK_DEBUGGER_TRAP();
                break;
-       /* 0x23 - Data CPLB Protection Violation,
-                normal case is handled in _cplb_hdr */
+       /* 0x23 - Data CPLB protection violation, handled here */
        case VEC_CPLB_VL:
                info.si_code = ILL_CPLB_VI;
-               sig = SIGILL;
+               sig = SIGBUS;
                printk(KERN_NOTICE EXC_0x23);
                CHK_DEBUGGER_TRAP();
                break;
@@ -382,11 +381,10 @@ asmlinkage void trap_c(struct pt_regs *fp)
                printk(KERN_NOTICE EXC_0x2A);
                CHK_DEBUGGER_TRAP();
                break;
-       /* 0x2B - Instruction CPLB protection Violation,
-               handled in _cplb_hdr */
+       /* 0x2B - Instruction CPLB protection violation, handled here */
        case VEC_CPLB_I_VL:
                info.si_code = ILL_CPLB_VI;
-               sig = SIGILL;
+               sig = SIGBUS;
                printk(KERN_NOTICE EXC_0x2B);
                CHK_DEBUGGER_TRAP();
                break;
@@ -469,7 +467,8 @@ asmlinkage void trap_c(struct pt_regs *fp)
                /* Ensure that bad return addresses don't end up in an infinite
                 * loop, due to speculative loads/reads
                 */
-               fp->pc = SAFE_USER_INSTRUCTION;
+               if (trapnr == VEC_CPLB_I_M)
+                       fp->pc = SAFE_USER_INSTRUCTION;
        }
        info.si_signo = sig;
        info.si_errno = 0;
@@ -630,6 +629,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
                }
        } else {
                printk(KERN_NOTICE "Kernel or interrupt exception\n");
+               print_modules();
        }
 
        if (retaddr >= (void *)FIXED_CODE_START  && retaddr < (void *)physical_mem_end
@@ -671,8 +671,8 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
                printk("\n");
        } else
                printk("\n" KERN_NOTICE
-                       "Cannot look at the [PC] for it is"
-                       " in unreadable memory - sorry\n");
+                       "Cannot look at the [PC] <%p> for it is"
+                       " in unreadable memory - sorry\n", retaddr);
 
        printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n");
        printk(KERN_NOTICE " SEQSTAT: %08lx  IPEND: %04lx  SYSCFG: %04lx\n",