aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel/process.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2007-05-09 05:35:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:56 -0400
commitc9f4f06d3191bd91c1a081b54a6c8e913e7b8a83 (patch)
treefe6bb926f612e67b1e57c6a448c7e5d41dd69dad /arch/avr32/kernel/process.c
parente61a1c1c4f240cec61300c8f27518c3e47570fd4 (diff)
wrap access to thread_info
Recently a few direct accesses to the thread_info in the task structure snuck back, so this wraps them with the appropriate wrapper. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/avr32/kernel/process.c')
-rw-r--r--arch/avr32/kernel/process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 4e4181ed1c6d..13f988402613 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -330,13 +330,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
330{ 330{
331 struct pt_regs *childregs; 331 struct pt_regs *childregs;
332 332
333 childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)p->thread_info)) - 1; 333 childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)task_stack_page(p))) - 1;
334 *childregs = *regs; 334 *childregs = *regs;
335 335
336 if (user_mode(regs)) 336 if (user_mode(regs))
337 childregs->sp = usp; 337 childregs->sp = usp;
338 else 338 else
339 childregs->sp = (unsigned long)p->thread_info + THREAD_SIZE; 339 childregs->sp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
340 340
341 childregs->r12 = 0; /* Set return value for child */ 341 childregs->r12 = 0; /* Set return value for child */
342 342
@@ -403,7 +403,7 @@ unsigned long get_wchan(struct task_struct *p)
403 if (!p || p == current || p->state == TASK_RUNNING) 403 if (!p || p == current || p->state == TASK_RUNNING)
404 return 0; 404 return 0;
405 405
406 stack_page = (unsigned long)p->thread_info; 406 stack_page = (unsigned long)task_stack_page(p);
407 BUG_ON(!stack_page); 407 BUG_ON(!stack_page);
408 408
409 /* 409 /*