diff options
Diffstat (limited to 'arch/m68k/kernel/process.c')
-rw-r--r-- | arch/m68k/kernel/process.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 13d109328a42..3f9cb55d0356 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -238,10 +238,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
238 | { | 238 | { |
239 | struct pt_regs * childregs; | 239 | struct pt_regs * childregs; |
240 | struct switch_stack * childstack, *stack; | 240 | struct switch_stack * childstack, *stack; |
241 | unsigned long stack_offset, *retp; | 241 | unsigned long *retp; |
242 | 242 | ||
243 | stack_offset = THREAD_SIZE - sizeof(struct pt_regs); | 243 | childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1; |
244 | childregs = (struct pt_regs *) ((unsigned long) (p->thread_info) + stack_offset); | ||
245 | 244 | ||
246 | *childregs = *regs; | 245 | *childregs = *regs; |
247 | childregs->d0 = 0; | 246 | childregs->d0 = 0; |
@@ -386,7 +385,7 @@ unsigned long get_wchan(struct task_struct *p) | |||
386 | if (!p || p == current || p->state == TASK_RUNNING) | 385 | if (!p || p == current || p->state == TASK_RUNNING) |
387 | return 0; | 386 | return 0; |
388 | 387 | ||
389 | stack_page = (unsigned long)(p->thread_info); | 388 | stack_page = (unsigned long)task_stack_page(p); |
390 | fp = ((struct switch_stack *)p->thread.ksp)->a6; | 389 | fp = ((struct switch_stack *)p->thread.ksp)->a6; |
391 | do { | 390 | do { |
392 | if (fp < stack_page+sizeof(struct thread_info) || | 391 | if (fp < stack_page+sizeof(struct thread_info) || |