sh: provide user_stack_pointer(), needed for tracehook support.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 12 Sep 2008 13:11:36 +0000 (22:11 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 12 Sep 2008 13:11:36 +0000 (22:11 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/processor_32.h
arch/sh/include/asm/processor_64.h

index 41d23210583c99a39b203c57b6107f9e638e6816..1cd3a144c85ccc0fe8da5bcfa10e3e57f964a437 100644 (file)
@@ -199,6 +199,8 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)  (task_pt_regs(tsk)->pc)
 #define KSTK_ESP(tsk)  (task_pt_regs(tsk)->regs[15])
 
+#define user_stack_pointer(regs)       ((regs)->regs[15])
+
 #define cpu_sleep()    __asm__ __volatile__ ("sleep" : : : "memory")
 #define cpu_relax()    barrier()
 
index 16609bc11627282de612b4ab1e769241ad46b3d4..ae19839f1d972d494dfa16613ffc3c528331f249 100644 (file)
@@ -267,6 +267,8 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)  ((tsk)->thread.pc)
 #define KSTK_ESP(tsk)  ((tsk)->thread.sp)
 
+#define user_stack_pointer(regs)       ((regs)->sp)
+
 #define cpu_relax()    barrier()
 
 #endif /* __ASSEMBLY__ */