Commit 36483c6b authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] sparc: task_stack_page()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d562ef6a
...@@ -302,7 +302,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) ...@@ -302,7 +302,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
int count = 0; int count = 0;
if (tsk != NULL) if (tsk != NULL)
task_base = (unsigned long) tsk->thread_info; task_base = (unsigned long) task_stack_page(tsk);
else else
task_base = (unsigned long) current_thread_info(); task_base = (unsigned long) current_thread_info();
...@@ -392,7 +392,7 @@ void flush_thread(void) ...@@ -392,7 +392,7 @@ void flush_thread(void)
/* We must fixup kregs as well. */ /* We must fixup kregs as well. */
/* XXX This was not fixed for ti for a while, worked. Unused? */ /* XXX This was not fixed for ti for a while, worked. Unused? */
current->thread.kregs = (struct pt_regs *) current->thread.kregs = (struct pt_regs *)
((char *)current->thread_info + (THREAD_SIZE - TRACEREG_SZ)); (task_stack_page(current) + (THREAD_SIZE - TRACEREG_SZ));
} }
} }
...@@ -459,7 +459,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, ...@@ -459,7 +459,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
unsigned long unused, unsigned long unused,
struct task_struct *p, struct pt_regs *regs) struct task_struct *p, struct pt_regs *regs)
{ {
struct thread_info *ti = p->thread_info; struct thread_info *ti = task_thread_info(p);
struct pt_regs *childregs; struct pt_regs *childregs;
char *new_stack; char *new_stack;
...@@ -482,7 +482,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, ...@@ -482,7 +482,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
* V V (stk.fr.) V (pt_regs) { (stk.fr.) } * V V (stk.fr.) V (pt_regs) { (stk.fr.) }
* +----- - - - - - ------+===========+============={+==========}+ * +----- - - - - - ------+===========+============={+==========}+
*/ */
new_stack = (char*)ti + THREAD_SIZE; new_stack = task_stack_page(p) + THREAD_SIZE;
if (regs->psr & PSR_PS) if (regs->psr & PSR_PS)
new_stack -= STACKFRAME_SZ; new_stack -= STACKFRAME_SZ;
new_stack -= STACKFRAME_SZ + TRACEREG_SZ; new_stack -= STACKFRAME_SZ + TRACEREG_SZ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment