diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-05-17 08:18:08 (GMT) |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-05-17 08:18:08 (GMT) |
commit | c6c6f75d54ca734c409e336245662934c21fcee0 (patch) | |
tree | 2a2483cb8cf3064c14a1b542f3682e50842b4d41 /arch/blackfin | |
parent | 803a8d2acbf220aeb27f0a98dacb36d4af3d6559 (diff) | |
download | linux-fsl-qoriq-c6c6f75d54ca734c409e336245662934c21fcee0.tar.xz |
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.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 5b84707..7bfbd95 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) /* 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 < (void *)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 < (void *)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 */ |