parisc: decide whether to go to slow path (tracesys) based on thread flags
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 20 May 2012 15:59:03 +0000 (11:59 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 1 Oct 2012 13:58:14 +0000 (09:58 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/parisc/include/asm/thread_info.h
arch/parisc/kernel/syscall.S

index d0e2fe7d54a69b7951a23af2e1806f38438e7195..d1fb79a36f3d32f1632772d6fb366b8416c96a17 100644 (file)
@@ -74,6 +74,8 @@ struct thread_info {
 
 #define _TIF_USER_WORK_MASK     (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \
                                  _TIF_NEED_RESCHED)
+#define _TIF_SYSCALL_TRACE_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP |        \
+                                _TIF_BLOCKSTEP)
 
 #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
 
index 54a9cbfc08ad6ffa8bcbe28d0ec92bc456dcc5b7..86742df0b1941b4599c4cf0be76e9be48445bfef 100644 (file)
@@ -180,9 +180,10 @@ linux_gateway_entry:
 
        /* Are we being ptraced? */
        mfctl   %cr30, %r1
-       LDREG   TI_TASK(%r1),%r1
-       ldw     TASK_PTRACE(%r1), %r1
-       bb,<,n  %r1,31,.Ltracesys
+       LDREG   TI_FLAGS(%r1),%r1
+       ldi     _TIF_SYSCALL_TRACE_MASK, %r19
+       and,COND(=) %r1, %r19, %r0
+       b,n     .Ltracesys
        
        /* Note!  We cannot use the syscall table that is mapped
        nearby since the gateway page is mapped execute-only. */