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>
This commit is contained in:
Al Viro
2012-11-18 12:50:10 -05:00
parent 5208ba24e7
commit 1ca97bb541
7 changed files with 14 additions and 0 deletions

View File

@@ -342,6 +342,10 @@ static inline void user_single_step_siginfo(struct task_struct *tsk,
#define signal_pt_regs() task_pt_regs(current)
#endif
#ifndef current_user_stack_pointer
#define current_user_stack_pointer() user_stack_pointer(current_pt_regs())
#endif
extern int task_current_syscall(struct task_struct *target, long *callno,
unsigned long args[6], unsigned int maxargs,
unsigned long *sp, unsigned long *pc);