aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/process.c14
-rw-r--r--arch/powerpc/kernel/ptrace-common.h4
-rw-r--r--arch/powerpc/kernel/smp.c6
-rw-r--r--arch/powerpc/platforms/cell/smp.c2
-rw-r--r--arch/powerpc/platforms/pseries/smp.c2
5 files changed, 13 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 9101358cc6b3..57703994a063 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -426,7 +426,7 @@ void show_regs(struct pt_regs * regs)
426 if (trap == 0x300 || trap == 0x600) 426 if (trap == 0x300 || trap == 0x600)
427 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); 427 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
428 printk("TASK = %p[%d] '%s' THREAD: %p", 428 printk("TASK = %p[%d] '%s' THREAD: %p",
429 current, current->pid, current->comm, current->thread_info); 429 current, current->pid, current->comm, task_thread_info(current));
430 430
431#ifdef CONFIG_SMP 431#ifdef CONFIG_SMP
432 printk(" CPU: %d", smp_processor_id()); 432 printk(" CPU: %d", smp_processor_id());
@@ -505,7 +505,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
505{ 505{
506 struct pt_regs *childregs, *kregs; 506 struct pt_regs *childregs, *kregs;
507 extern void ret_from_fork(void); 507 extern void ret_from_fork(void);
508 unsigned long sp = (unsigned long)p->thread_info + THREAD_SIZE; 508 unsigned long sp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
509 509
510 CHECK_FULL_REGS(regs); 510 CHECK_FULL_REGS(regs);
511 /* Copy registers */ 511 /* Copy registers */
@@ -518,7 +518,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
518#ifdef CONFIG_PPC32 518#ifdef CONFIG_PPC32
519 childregs->gpr[2] = (unsigned long) p; 519 childregs->gpr[2] = (unsigned long) p;
520#else 520#else
521 clear_ti_thread_flag(p->thread_info, TIF_32BIT); 521 clear_tsk_thread_flag(p, TIF_32BIT);
522#endif 522#endif
523 p->thread.regs = NULL; /* no user register state */ 523 p->thread.regs = NULL; /* no user register state */
524 } else { 524 } else {
@@ -590,10 +590,8 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
590 * set. Do it now. 590 * set. Do it now.
591 */ 591 */
592 if (!current->thread.regs) { 592 if (!current->thread.regs) {
593 unsigned long childregs = (unsigned long)current->thread_info + 593 struct pt_regs *regs = task_stack_page(current) + THREAD_SIZE;
594 THREAD_SIZE; 594 current->thread.regs = regs - 1;
595 childregs -= sizeof(struct pt_regs);
596 current->thread.regs = (struct pt_regs *)childregs;
597 } 595 }
598 596
599 memset(regs->gpr, 0, sizeof(regs->gpr)); 597 memset(regs->gpr, 0, sizeof(regs->gpr));
@@ -769,7 +767,7 @@ out:
769static int validate_sp(unsigned long sp, struct task_struct *p, 767static int validate_sp(unsigned long sp, struct task_struct *p,
770 unsigned long nbytes) 768 unsigned long nbytes)
771{ 769{
772 unsigned long stack_page = (unsigned long)p->thread_info; 770 unsigned long stack_page = (unsigned long)task_stack_page(p);
773 771
774 if (sp >= stack_page + sizeof(struct thread_struct) 772 if (sp >= stack_page + sizeof(struct thread_struct)
775 && sp <= stack_page + THREAD_SIZE - nbytes) 773 && sp <= stack_page + THREAD_SIZE - nbytes)
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h
index b1babb729673..5ccbdbe0d5c9 100644
--- a/arch/powerpc/kernel/ptrace-common.h
+++ b/arch/powerpc/kernel/ptrace-common.h
@@ -62,7 +62,7 @@ static inline void set_single_step(struct task_struct *task)
62 struct pt_regs *regs = task->thread.regs; 62 struct pt_regs *regs = task->thread.regs;
63 if (regs != NULL) 63 if (regs != NULL)
64 regs->msr |= MSR_SE; 64 regs->msr |= MSR_SE;
65 set_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); 65 set_tsk_thread_flag(task, TIF_SINGLESTEP);
66} 66}
67 67
68static inline void clear_single_step(struct task_struct *task) 68static inline void clear_single_step(struct task_struct *task)
@@ -70,7 +70,7 @@ static inline void clear_single_step(struct task_struct *task)
70 struct pt_regs *regs = task->thread.regs; 70 struct pt_regs *regs = task->thread.regs;
71 if (regs != NULL) 71 if (regs != NULL)
72 regs->msr &= ~MSR_SE; 72 regs->msr &= ~MSR_SE;
73 clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); 73 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
74} 74}
75 75
76#ifdef CONFIG_ALTIVEC 76#ifdef CONFIG_ALTIVEC
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index d381ec90b759..c8458c531b25 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -338,8 +338,8 @@ static void __init smp_create_idle(unsigned int cpu)
338#ifdef CONFIG_PPC64 338#ifdef CONFIG_PPC64
339 paca[cpu].__current = p; 339 paca[cpu].__current = p;
340#endif 340#endif
341 current_set[cpu] = p->thread_info; 341 current_set[cpu] = task_thread_info(p);
342 p->thread_info->cpu = cpu; 342 task_thread_info(p)->cpu = cpu;
343} 343}
344 344
345void __init smp_prepare_cpus(unsigned int max_cpus) 345void __init smp_prepare_cpus(unsigned int max_cpus)
@@ -375,7 +375,7 @@ void __devinit smp_prepare_boot_cpu(void)
375#ifdef CONFIG_PPC64 375#ifdef CONFIG_PPC64
376 paca[boot_cpuid].__current = current; 376 paca[boot_cpuid].__current = current;
377#endif 377#endif
378 current_set[boot_cpuid] = current->thread_info; 378 current_set[boot_cpuid] = task_thread_info(current);
379} 379}
380 380
381#ifdef CONFIG_HOTPLUG_CPU 381#ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index de96eadf419d..bdf6c5fe58c0 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -86,7 +86,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
86 pcpu = get_hard_smp_processor_id(lcpu); 86 pcpu = get_hard_smp_processor_id(lcpu);
87 87
88 /* Fixup atomic count: it exited inside IRQ handler. */ 88 /* Fixup atomic count: it exited inside IRQ handler. */
89 paca[lcpu].__current->thread_info->preempt_count = 0; 89 task_thread_info(paca[lcpu].__current)->preempt_count = 0;
90 90
91 /* 91 /*
92 * If the RTAS start-cpu token does not exist then presume the 92 * If the RTAS start-cpu token does not exist then presume the
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index e4d017dd5ef3..8e6b1ed1396e 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -282,7 +282,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
282 pcpu = get_hard_smp_processor_id(lcpu); 282 pcpu = get_hard_smp_processor_id(lcpu);
283 283
284 /* Fixup atomic count: it exited inside IRQ handler. */ 284 /* Fixup atomic count: it exited inside IRQ handler. */
285 paca[lcpu].__current->thread_info->preempt_count = 0; 285 task_thread_info(paca[lcpu].__current)->preempt_count = 0;
286 286
287 /* 287 /*
288 * If the RTAS start-cpu token does not exist then presume the 288 * If the RTAS start-cpu token does not exist then presume the