Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298836
b: refs/heads/master
c: e172353
h: refs/heads/master
v: v3
  • Loading branch information
Chris Metcalf committed Apr 2, 2012
1 parent dd7a169 commit 8cc4774
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f639fdcd8c186c8128c616e94a7e7b159c968ae
refs/heads/master: e17235382dbb05f70146e141e4b780fd069050dc
6 changes: 5 additions & 1 deletion trunk/arch/tile/include/asm/traps.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ void do_breakpoint(struct pt_regs *, int fault_num);


#ifdef __tilegx__
/* kernel/single_step.c */
void gx_singlestep_handle(struct pt_regs *, int fault_num);

/* kernel/intvec_64.S */
void fill_ra_stack(void);
#endif

#endif /* _ASM_TILE_SYSCALLS_H */
#endif /* _ASM_TILE_TRAPS_H */
12 changes: 12 additions & 0 deletions trunk/arch/tile/kernel/intvec_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,18 @@ int_unalign:
push_extra_callee_saves r0
j do_trap

/* Fill the return address stack with nonzero entries. */
STD_ENTRY(fill_ra_stack)
{
move r0, lr
jal 1f
}
1: jal 2f
2: jal 3f
3: jal 4f
4: jrp r0
STD_ENDPROC(fill_ra_stack)

/* Include .intrpt1 array of interrupt vectors */
.section ".intrpt1", "ax"

Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/tile/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,18 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num,
address = regs->pc;
break;
#ifdef __tilegx__
case INT_ILL_TRANS:
case INT_ILL_TRANS: {
/* Avoid a hardware erratum with the return address stack. */
fill_ra_stack();

signo = SIGSEGV;
code = SEGV_MAPERR;
if (reason & SPR_ILL_TRANS_REASON__I_STREAM_VA_RMASK)
address = regs->pc;
else
address = 0; /* FIXME: GX: single-step for address */
break;
}
#endif
default:
panic("Unexpected do_trap interrupt number %d", fault_num);
Expand Down

0 comments on commit 8cc4774

Please sign in to comment.