Skip to content

Commit

Permalink
[PATCH] sh: task_stack_page()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jan 12, 2006
1 parent cafcfca commit 308a792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/sh/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
if (user_mode(regs)) {
childregs->regs[15] = usp;
} else {
childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE;
childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE;
}
if (clone_flags & CLONE_SETTLS) {
childregs->gbr = childregs->regs[0];
Expand Down
4 changes: 2 additions & 2 deletions include/asm-sh/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ extern void show_regs(struct pt_regs *);

#ifdef CONFIG_SH_DSP
#define task_pt_regs(task) \
((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \
((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
- sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
#else
#define task_pt_regs(task) \
((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \
((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
- sizeof(unsigned long)) - 1)
#endif

Expand Down

0 comments on commit 308a792

Please sign in to comment.