aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-11-18 12:50:10 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-19 18:07:39 -0500
commit1ca97bb541a1f5a735e697a8bba763cde3aab452 (patch)
tree548d835c0f13de780678922ba3b3ea4c841e8cd7 /arch/ia64/include/asm
parent5208ba24e7826519d310474dedaed2f84b0ab6a0 (diff)
new helper: current_user_stack_pointer()
Cross-architecture equivalent of rdusp(); default is user_stack_pointer(current_pt_regs()) - that works for almost all platforms that have usp saved in pt_regs. The only exception from that is ia64 - we want memory stack, not the backing store for register one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/ia64/include/asm')
-rw-r--r--arch/ia64/include/asm/ptrace.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h
index b0e973649cb9..845143990a1d 100644
--- a/arch/ia64/include/asm/ptrace.h
+++ b/arch/ia64/include/asm/ptrace.h
@@ -78,6 +78,11 @@ static inline long regs_return_value(struct pt_regs *regs)
78 unsigned long __ip = instruction_pointer(regs); \ 78 unsigned long __ip = instruction_pointer(regs); \
79 (__ip & ~3UL) + ((__ip & 3UL) << 2); \ 79 (__ip & ~3UL) + ((__ip & 3UL) << 2); \
80}) 80})
81/*
82 * Why not default? Because user_stack_pointer() on ia64 gives register
83 * stack backing store instead...
84 */
85#define current_user_stack_pointer() (current_pt_regs()->r12)
81 86
82 /* given a pointer to a task_struct, return the user's pt_regs */ 87 /* given a pointer to a task_struct, return the user's pt_regs */
83# define task_pt_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) 88# define task_pt_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)