summaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/intvec_64.S
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-03-29 16:11:09 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-04-02 12:13:36 -0400
commit2858f856021340f3730fa8639dd520a2e4331f7f (patch)
tree5dec3cf9478a9507adf8cae7834eca1da3da6778 /arch/tile/kernel/intvec_64.S
parentcb210ee3a81afab7c64777635cc18899a2bdd9a5 (diff)
downloadblackbird-op-linux-2858f856021340f3730fa8639dd520a2e4331f7f.tar.gz
blackbird-op-linux-2858f856021340f3730fa8639dd520a2e4331f7f.zip
arch/tile: fix single-stepping over swint1 instructions on tilegx
If we are single-stepping and make a syscall, we call ptrace_notify() explicitly on the return path back to user space, since we are returning to a pc value set artificially to the next instruction, and otherwise we won't register that we stepped over the syscall instruction (swint1). Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/intvec_64.S')
-rw-r--r--arch/tile/kernel/intvec_64.S21
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/tile/kernel/intvec_64.S b/arch/tile/kernel/intvec_64.S
index 005535d108c1..fdff17c70cc8 100644
--- a/arch/tile/kernel/intvec_64.S
+++ b/arch/tile/kernel/intvec_64.S
@@ -22,6 +22,7 @@
#include <asm/irqflags.h>
#include <asm/asm-offsets.h>
#include <asm/types.h>
+#include <asm/signal.h>
#include <hv/hypervisor.h>
#include <arch/abi.h>
#include <arch/interrupts.h>
@@ -1039,11 +1040,25 @@ handle_syscall:
/* Do syscall trace again, if requested. */
ld r30, r31
- andi r30, r30, _TIF_SYSCALL_TRACE
- beqzt r30, 1f
+ andi r0, r30, _TIF_SYSCALL_TRACE
+ {
+ andi r0, r30, _TIF_SINGLESTEP
+ beqzt r0, 1f
+ }
jal do_syscall_trace
FEEDBACK_REENTER(handle_syscall)
-1: j .Lresume_userspace /* jump into middle of interrupt_return */
+ andi r0, r30, _TIF_SINGLESTEP
+
+1: beqzt r0, 2f
+
+ /* Single stepping -- notify ptrace. */
+ {
+ movei r0, SIGTRAP
+ jal ptrace_notify
+ }
+ FEEDBACK_REENTER(handle_syscall)
+
+2: j .Lresume_userspace /* jump into middle of interrupt_return */
.Lcompat_syscall:
/*
OpenPOWER on IntegriCloud