aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Song <barry.song@analog.com>2010-01-19 06:01:08 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:49 -0500
commit5e8d3210b5bffbe64afca9152241284a46611c7e (patch)
tree734a4ddcdcf8ad3fc7c557f4702acdbe3817bda4
parent0531c467da6438f278e9420a30f73eea2fdb73bd (diff)
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>
-rw-r--r--arch/blackfin/kernel/traps.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 85766805b03..4eaca2d1dee 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)
260#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON 260#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
261 int j; 261 int j;
262#endif 262#endif
263#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
264 unsigned int cpu = raw_smp_processor_id(); 263 unsigned int cpu = raw_smp_processor_id();
265#endif
266 const char *strerror = NULL; 264 const char *strerror = NULL;
267 int sig = 0; 265 int sig = 0;
268 siginfo_t info; 266 siginfo_t info;
@@ -651,7 +649,17 @@ asmlinkage notrace void trap_c(struct pt_regs *fp)
651 { 649 {
652 info.si_signo = sig; 650 info.si_signo = sig;
653 info.si_errno = 0; 651 info.si_errno = 0;
654 info.si_addr = (void __user *)fp->pc; 652 switch (trapnr) {
653 case VEC_CPLB_VL:
654 case VEC_MISALI_D:
655 case VEC_CPLB_M:
656 case VEC_CPLB_MHIT:
657 info.si_addr = (void __user *)cpu_pda[cpu].dcplb_fault_addr;
658 break;
659 default:
660 info.si_addr = (void __user *)fp->pc;
661 break;
662 }
655 force_sig_info(sig, &info, current); 663 force_sig_info(sig, &info, current);
656 } 664 }
657 665