aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/process.c6
-rw-r--r--arch/sparc64/kernel/traps.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 1bc772477079..1dc3650c5cae 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -616,11 +616,11 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
616 unsigned long unused, 616 unsigned long unused,
617 struct task_struct *p, struct pt_regs *regs) 617 struct task_struct *p, struct pt_regs *regs)
618{ 618{
619 struct thread_info *t = p->thread_info; 619 struct thread_info *t = task_thread_info(p);
620 char *child_trap_frame; 620 char *child_trap_frame;
621 621
622 /* Calculate offset to stack_frame & pt_regs */ 622 /* Calculate offset to stack_frame & pt_regs */
623 child_trap_frame = ((char *)t) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); 623 child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ));
624 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); 624 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));
625 625
626 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | 626 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
@@ -845,7 +845,7 @@ unsigned long get_wchan(struct task_struct *task)
845 task->state == TASK_RUNNING) 845 task->state == TASK_RUNNING)
846 goto out; 846 goto out;
847 847
848 thread_info_base = (unsigned long) task->thread_info; 848 thread_info_base = (unsigned long) task_stack_page(task);
849 bias = STACK_BIAS; 849 bias = STACK_BIAS;
850 fp = task_thread_info(task)->ksp + bias; 850 fp = task_thread_info(task)->ksp + bias;
851 851
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 5570e7bb22bb..8d44ae5a15e3 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -1808,7 +1808,7 @@ static void user_instruction_dump (unsigned int __user *pc)
1808void show_stack(struct task_struct *tsk, unsigned long *_ksp) 1808void show_stack(struct task_struct *tsk, unsigned long *_ksp)
1809{ 1809{
1810 unsigned long pc, fp, thread_base, ksp; 1810 unsigned long pc, fp, thread_base, ksp;
1811 struct thread_info *tp = tsk->thread_info; 1811 void *tp = task_stack_page(tsk);
1812 struct reg_window *rw; 1812 struct reg_window *rw;
1813 int count = 0; 1813 int count = 0;
1814 1814
@@ -1862,7 +1862,7 @@ static inline int is_kernel_stack(struct task_struct *task,
1862 return 0; 1862 return 0;
1863 } 1863 }
1864 1864
1865 thread_base = (unsigned long) task->thread_info; 1865 thread_base = (unsigned long) task_stack_page(task);
1866 thread_end = thread_base + sizeof(union thread_union); 1866 thread_end = thread_base + sizeof(union thread_union);
1867 if (rw_addr >= thread_base && 1867 if (rw_addr >= thread_base &&
1868 rw_addr < thread_end && 1868 rw_addr < thread_end &&