aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2007-11-21 03:38:05 -0500
committerBryan Wu <bryan.wu@analog.com>2007-11-21 03:38:05 -0500
commitfb322915a05804a3a153f714f2f08e4c32ce84c7 (patch)
tree019c4ff7e2e1593d3dfab1206386ecaf61e7fb72 /arch/blackfin/kernel
parent569a50ca3f56cd69199733580e7ca0e81029473a (diff)
Blackfin arch: fix bug when sending signals with the wrong PC, cause gdb get confused
We need to send signals with the proper PC, or gdb gets confused, and lots of tests fail. This should fix that. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/traps.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index d88098c58bfa..910cdd43fe60 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -463,18 +463,20 @@ asmlinkage void trap_c(struct pt_regs *fp)
463#endif 463#endif
464 panic("Kernel exception"); 464 panic("Kernel exception");
465 } 465 }
466
467 /* Ensure that bad return addresses don't end up in an infinite
468 * loop, due to speculative loads/reads
469 */
470 if (trapnr == VEC_CPLB_I_M)
471 fp->pc = SAFE_USER_INSTRUCTION;
472 } 466 }
467
473 info.si_signo = sig; 468 info.si_signo = sig;
474 info.si_errno = 0; 469 info.si_errno = 0;
475 info.si_addr = (void *)fp->pc; 470 info.si_addr = (void *)fp->pc;
476 force_sig_info(sig, &info, current); 471 force_sig_info(sig, &info, current);
477 472
473 /* Ensure that bad return addresses don't end up in an infinite
474 * loop, due to speculative loads/reads. This needs to be done after
475 * the signal has been sent.
476 */
477 if (trapnr == VEC_CPLB_I_M && sig != SIGTRAP)
478 fp->pc = SAFE_USER_INSTRUCTION;
479
478 trace_buffer_restore(j); 480 trace_buffer_restore(j);
479 return; 481 return;
480} 482}