diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-04 13:52:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-04 14:13:29 -0700 |
commit | 40138249c3b7a0762155216b963ec7fd4d09b5b4 (patch) | |
tree | be0a2441aa7f7b3245e6de70cc4a8055031742f8 /arch/sparc/include/asm/ptrace.h | |
parent | ecefbd94b834fa32559d854646d777c56749ef1c (diff) | |
download | op-kernel-dev-40138249c3b7a0762155216b963ec7fd4d09b5b4.zip op-kernel-dev-40138249c3b7a0762155216b963ec7fd4d09b5b4.tar.gz |
sparc64: Rearrange thread info to cheaply clear syscall noerror state.
After fixing a couple of brainos, it even seems to work. What's done here
is move of ->syscall_noerror right before FPDEPTH byte in ->flags and
using sth to [%g6 + TI_SYS_NOERROR] instead of stb to [%g6 + TI_FPDEPTH] in
both branches of etrap_save. AFAICS, that ought to be solid. Again,
deciding what to do with now unused delay slot of branch on ->syscall_noerror
and dealing with the order of tests in ret_from_sys is a separate question,
but at least that way we don't have to clean ->syscall_noerror in there at
all. AFAICS, it ought to be a clear win - sth is not going to cost more than
stb on etrap_64.S side of things, and we are losing write on syscalls.S one.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/ptrace.h')
-rw-r--r-- | arch/sparc/include/asm/ptrace.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index fd9c3f2..eeed804 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h @@ -202,9 +202,7 @@ struct global_reg_snapshot { }; extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; -#define force_successful_syscall_return() \ -do { current_thread_info()->syscall_noerror = 1; \ -} while (0) +#define force_successful_syscall_return() set_thread_noerror(1) #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) #define instruction_pointer(regs) ((regs)->tpc) #define instruction_pointer_set(regs, val) ((regs)->tpc = (val)) |