Skip to content

Commit

Permalink
sh: provide user_stack_pointer(), needed for tracehook support.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Sep 12, 2008
1 parent f8b890a commit 9996b42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sh/include/asm/processor_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 2 additions & 0 deletions arch/sh/include/asm/processor_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down

0 comments on commit 9996b42

Please sign in to comment.