summaryrefslogtreecommitdiff
path: root/arch/alpha/include/asm
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2012-08-19 06:40:59 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-08-19 19:41:19 +0400
commitbe53db6e4edd9dc013b21a929ad2b142dea8b9c0 (patch)
tree7c4604295375f432071c2077362df2e6c278af53 /arch/alpha/include/asm
parentf2db633d301b4b50f5f93de0e8314cc81e9bc7de (diff)
downloadlinux-be53db6e4edd9dc013b21a929ad2b142dea8b9c0.tar.xz
alpha: take a bunch of syscalls into osf_sys.c
New helper: current_thread_info(). Allows to do a bunch of odd syscalls in C. While we are at it, there had never been a reason to do osf_getpriority() in assembler. We also get "namespace"-aware (read: consistent with getuid(2), etc.) behaviour from getx?id() syscalls now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Michael Cree <mcree@orcon.net.nz> Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/include/asm')
-rw-r--r--arch/alpha/include/asm/ptrace.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h
index fd698a174f26..b87755a19554 100644
--- a/arch/alpha/include/asm/ptrace.h
+++ b/arch/alpha/include/asm/ptrace.h
@@ -76,7 +76,10 @@ struct switch_stack {
#define task_pt_regs(task) \
((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
-#define force_successful_syscall_return() (task_pt_regs(current)->r0 = 0)
+#define current_pt_regs() \
+ ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
+
+#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
#endif