Commit c6c6f75d authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: cleanup the icplb/dcplb multiple hit checks

so that we always send the same signal and we handle the NULL ptr condition properly
Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 803a8d2a
...@@ -364,13 +364,13 @@ asmlinkage void trap_c(struct pt_regs *fp) ...@@ -364,13 +364,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
/* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */
case VEC_CPLB_MHIT: case VEC_CPLB_MHIT:
info.si_code = ILL_CPLB_MULHIT; info.si_code = ILL_CPLB_MULHIT;
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
sig = SIGSEGV; sig = SIGSEGV;
printk(KERN_NOTICE "NULL pointer access (probably)\n"); #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
#else if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START)
sig = SIGILL; printk(KERN_NOTICE "NULL pointer access\n");
printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); else
#endif #endif
printk(KERN_NOTICE EXC_0x27(KERN_NOTICE));
CHK_DEBUGGER_TRAP(); CHK_DEBUGGER_TRAP();
break; break;
/* 0x28 - Emulation Watchpoint, handled here */ /* 0x28 - Emulation Watchpoint, handled here */
...@@ -419,13 +419,13 @@ asmlinkage void trap_c(struct pt_regs *fp) ...@@ -419,13 +419,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
/* 0x2D - Instruction CPLB Multiple Hits, handled here */ /* 0x2D - Instruction CPLB Multiple Hits, handled here */
case VEC_CPLB_I_MHIT: case VEC_CPLB_I_MHIT:
info.si_code = ILL_CPLB_MULHIT; info.si_code = ILL_CPLB_MULHIT;
#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
sig = SIGSEGV; sig = SIGSEGV;
printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n"); #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
#else if (saved_icplb_fault_addr < (void *)FIXED_CODE_START)
sig = SIGILL; printk(KERN_NOTICE "Jump to NULL address\n");
printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); else
#endif #endif
printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE));
CHK_DEBUGGER_TRAP(); CHK_DEBUGGER_TRAP();
break; break;
/* 0x2E - Illegal use of Supervisor Resource, handled here */ /* 0x2E - Illegal use of Supervisor Resource, handled here */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment