]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/blackfin/kernel/traps.c
firmware: fix the request_firmware() dummy
[linux-2.6-omap-h63xx.git] / arch / blackfin / kernel / traps.c
index 5b847070dae509f293827e327e32204d4be8e133..f061f5181623e4214e6e606642c83a79c15ae1fc 100644 (file)
@@ -67,7 +67,7 @@ void __init trap_init(void)
        CSYNC();
 }
 
-void *saved_icplb_fault_addr, *saved_dcplb_fault_addr;
+unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr;
 
 int kstack_depth_to_print = 48;
 
@@ -364,13 +364,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
        /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */
        case VEC_CPLB_MHIT:
                info.si_code = ILL_CPLB_MULHIT;
-#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
                sig = SIGSEGV;
-               printk(KERN_NOTICE "NULL pointer access (probably)\n");
-#else
-               sig = SIGILL;
-               printk(KERN_NOTICE EXC_0x27(KERN_NOTICE));
+#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
+               if (saved_dcplb_fault_addr < FIXED_CODE_START)
+                       printk(KERN_NOTICE "NULL pointer access\n");
+               else
 #endif
+                       printk(KERN_NOTICE EXC_0x27(KERN_NOTICE));
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x28 - Emulation Watchpoint, handled here */
@@ -419,13 +419,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
        /* 0x2D - Instruction CPLB Multiple Hits, handled here */
        case VEC_CPLB_I_MHIT:
                info.si_code = ILL_CPLB_MULHIT;
-#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
                sig = SIGSEGV;
-               printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n");
-#else
-               sig = SIGILL;
-               printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE));
+#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
+               if (saved_icplb_fault_addr < FIXED_CODE_START)
+                       printk(KERN_NOTICE "Jump to NULL address\n");
+               else
 #endif
+                       printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE));
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x2E - Illegal use of Supervisor Resource, handled here */
@@ -939,8 +939,6 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
 
        oops_in_progress = 1;
 
-       printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", saved_dcplb_fault_addr);
-       printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", saved_icplb_fault_addr);
        dump_bfin_process(fp);
        dump_bfin_mem(fp);
        show_regs(fp);