aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-05-17 04:18:08 -0400
committerBryan Wu <cooloney@kernel.org>2008-05-17 04:18:08 -0400
commitc6c6f75d54ca734c409e336245662934c21fcee0 (patch)
tree2a2483cb8cf3064c14a1b542f3682e50842b4d41 /arch/blackfin
parent803a8d2acbf220aeb27f0a98dacb36d4af3d6559 (diff)
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: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/traps.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 5b847070dae5..7bfbd958980c 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -364,13 +364,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
364 /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ 364 /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */
365 case VEC_CPLB_MHIT: 365 case VEC_CPLB_MHIT:
366 info.si_code = ILL_CPLB_MULHIT; 366 info.si_code = ILL_CPLB_MULHIT;
367#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
368 sig = SIGSEGV; 367 sig = SIGSEGV;
369 printk(KERN_NOTICE "NULL pointer access (probably)\n"); 368#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
370#else 369 if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START)
371 sig = SIGILL; 370 printk(KERN_NOTICE "NULL pointer access\n");
372 printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); 371 else
373#endif 372#endif
373 printk(KERN_NOTICE EXC_0x27(KERN_NOTICE));
374 CHK_DEBUGGER_TRAP(); 374 CHK_DEBUGGER_TRAP();
375 break; 375 break;
376 /* 0x28 - Emulation Watchpoint, handled here */ 376 /* 0x28 - Emulation Watchpoint, handled here */
@@ -419,13 +419,13 @@ asmlinkage void trap_c(struct pt_regs *fp)
419 /* 0x2D - Instruction CPLB Multiple Hits, handled here */ 419 /* 0x2D - Instruction CPLB Multiple Hits, handled here */
420 case VEC_CPLB_I_MHIT: 420 case VEC_CPLB_I_MHIT:
421 info.si_code = ILL_CPLB_MULHIT; 421 info.si_code = ILL_CPLB_MULHIT;
422#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
423 sig = SIGSEGV; 422 sig = SIGSEGV;
424 printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n"); 423#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
425#else 424 if (saved_icplb_fault_addr < (void *)FIXED_CODE_START)
426 sig = SIGILL; 425 printk(KERN_NOTICE "Jump to NULL address\n");
427 printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); 426 else
428#endif 427#endif
428 printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE));
429 CHK_DEBUGGER_TRAP(); 429 CHK_DEBUGGER_TRAP();
430 break; 430 break;
431 /* 0x2E - Illegal use of Supervisor Resource, handled here */ 431 /* 0x2E - Illegal use of Supervisor Resource, handled here */