diff options
author | Barry Song <barry.song@analog.com> | 2010-01-19 11:01:08 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:49 -0500 |
commit | 5e8d3210b5bffbe64afca9152241284a46611c7e (patch) | |
tree | 734a4ddcdcf8ad3fc7c557f4702acdbe3817bda4 /arch/blackfin/kernel | |
parent | 0531c467da6438f278e9420a30f73eea2fdb73bd (diff) | |
download | blackbird-op-linux-5e8d3210b5bffbe64afca9152241284a46611c7e.tar.gz blackbird-op-linux-5e8d3210b5bffbe64afca9152241284a46611c7e.zip |
Blackfin: fill out the signal si_addr when sending a SIGBUS/SIGSEGV
Some userspace applications use this member in diagnosing crashes. It
also makes some LTP tests pass (i.e. the Blackfin arch behaves more like
everyone else).
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/traps.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 85766805b03a..4eaca2d1deed 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -260,9 +260,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON int j; #endif -#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO unsigned int cpu = raw_smp_processor_id(); -#endif const char *strerror = NULL; int sig = 0; siginfo_t info; @@ -651,7 +649,17 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) { info.si_signo = sig; info.si_errno = 0; - info.si_addr = (void __user *)fp->pc; + switch (trapnr) { + case VEC_CPLB_VL: + case VEC_MISALI_D: + case VEC_CPLB_M: + case VEC_CPLB_MHIT: + info.si_addr = (void __user *)cpu_pda[cpu].dcplb_fault_addr; + break; + default: + info.si_addr = (void __user *)fp->pc; + break; + } force_sig_info(sig, &info, current); } |