aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:08:59 -0500
commitdc8f6029cd51af1b148846a32e68d69013a5cc0f (patch)
tree64288cee77b341c2c39accbe5f593ff9445e18f1 /arch
parent40bc9c671a9f0a5189c07a2b4280aec9b40e30cd (diff)
[PATCH] mips: task_thread_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/ptrace.c2
-rw-r--r--arch/mips/kernel/ptrace32.c4
-rw-r--r--arch/mips/kernel/smp_mt.c7
-rw-r--r--arch/mips/kernel/syscall.c2
-rw-r--r--arch/mips/kernel/traps.c2
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c4
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c4
-rw-r--r--arch/mips/sibyte/cfe/smp.c2
8 files changed, 13 insertions, 14 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 6c358b333166..f838b36cc765 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -438,7 +438,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
438 break; 438 break;
439 439
440 case PTRACE_GET_THREAD_AREA: 440 case PTRACE_GET_THREAD_AREA:
441 ret = put_user(child->thread_info->tp_value, 441 ret = put_user(task_thread_info(child)->tp_value,
442 (unsigned long __user *) data); 442 (unsigned long __user *) data);
443 break; 443 break;
444 444
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c
index 456ec438728c..0c82b25d8c6d 100644
--- a/arch/mips/kernel/ptrace32.c
+++ b/arch/mips/kernel/ptrace32.c
@@ -375,7 +375,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
375 break; 375 break;
376 376
377 case PTRACE_GET_THREAD_AREA: 377 case PTRACE_GET_THREAD_AREA:
378 ret = put_user(child->thread_info->tp_value, 378 ret = put_user(task_thread_info(child)->tp_value,
379 (unsigned int __user *) (unsigned long) data); 379 (unsigned int __user *) (unsigned long) data);
380 break; 380 break;
381 381
@@ -389,7 +389,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
389 break; 389 break;
390 390
391 case PTRACE_GET_THREAD_AREA_3264: 391 case PTRACE_GET_THREAD_AREA_3264:
392 ret = put_user(child->thread_info->tp_value, 392 ret = put_user(task_thread_info(child)->tp_value,
393 (unsigned long __user *) (unsigned long) data); 393 (unsigned long __user *) (unsigned long) data);
394 break; 394 break;
395 395
diff --git a/arch/mips/kernel/smp_mt.c b/arch/mips/kernel/smp_mt.c
index d429544ba4bc..794a1c3de2a4 100644
--- a/arch/mips/kernel/smp_mt.c
+++ b/arch/mips/kernel/smp_mt.c
@@ -287,6 +287,7 @@ void prom_prepare_cpus(unsigned int max_cpus)
287 */ 287 */
288void prom_boot_secondary(int cpu, struct task_struct *idle) 288void prom_boot_secondary(int cpu, struct task_struct *idle)
289{ 289{
290 struct thread_info *gp = task_thread_info(idle);
290 dvpe(); 291 dvpe();
291 set_c0_mvpcontrol(MVPCONTROL_VPC); 292 set_c0_mvpcontrol(MVPCONTROL_VPC);
292 293
@@ -307,11 +308,9 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
307 write_tc_gpr_sp( __KSTK_TOS(idle)); 308 write_tc_gpr_sp( __KSTK_TOS(idle));
308 309
309 /* global pointer */ 310 /* global pointer */
310 write_tc_gpr_gp((unsigned long)idle->thread_info); 311 write_tc_gpr_gp((unsigned long)gp);
311 312
312 flush_icache_range((unsigned long)idle->thread_info, 313 flush_icache_range((unsigned long)gp, (unsigned long)(gp + 1));
313 (unsigned long)idle->thread_info +
314 sizeof(struct thread_info));
315 314
316 /* finally out of configuration and into chaos */ 315 /* finally out of configuration and into chaos */
317 clear_c0_mvpcontrol(MVPCONTROL_VPC); 316 clear_c0_mvpcontrol(MVPCONTROL_VPC);
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 006881942aa2..332358430ff5 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -263,7 +263,7 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
263 263
264void sys_set_thread_area(unsigned long addr) 264void sys_set_thread_area(unsigned long addr)
265{ 265{
266 struct thread_info *ti = current->thread_info; 266 struct thread_info *ti = task_thread_info(current);
267 267
268 ti->tp_value = addr; 268 ti->tp_value = addr;
269 269
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 7058893d5ad2..59a187956de0 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -519,7 +519,7 @@ static inline int simulate_llsc(struct pt_regs *regs)
519 */ 519 */
520static inline int simulate_rdhwr(struct pt_regs *regs) 520static inline int simulate_rdhwr(struct pt_regs *regs)
521{ 521{
522 struct thread_info *ti = current->thread_info; 522 struct thread_info *ti = task_thread_info(current);
523 unsigned int opcode; 523 unsigned int opcode;
524 524
525 if (unlikely(get_insn_opcode(regs, &opcode))) 525 if (unlikely(get_insn_opcode(regs, &opcode)))
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 0527170d6adb..f17f575f58f0 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -93,8 +93,8 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
93 */ 93 */
94void prom_boot_secondary(int cpu, struct task_struct *idle) 94void prom_boot_secondary(int cpu, struct task_struct *idle)
95{ 95{
96 unsigned long gp = (unsigned long) idle->thread_info; 96 unsigned long gp = (unsigned long) task_thread_info(idle);
97 unsigned long sp = gp + THREAD_SIZE - 32; 97 unsigned long sp = __KSTK_TOP(idle);
98 98
99 secondary_sp = sp; 99 secondary_sp = sp;
100 secondary_gp = gp; 100 secondary_gp = gp;
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index 3a8291b7d26d..dbef3f6b5650 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -168,8 +168,8 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
168 */ 168 */
169void __init prom_boot_secondary(int cpu, struct task_struct *idle) 169void __init prom_boot_secondary(int cpu, struct task_struct *idle)
170{ 170{
171 unsigned long gp = (unsigned long) idle->thread_info; 171 unsigned long gp = (unsigned long)task_thread_info(idle);
172 unsigned long sp = gp + THREAD_SIZE - 32; 172 unsigned long sp = __KSTK_TOS(idle);
173 173
174 LAUNCH_SLAVE(cputonasid(cpu),cputoslice(cpu), 174 LAUNCH_SLAVE(cputonasid(cpu),cputoslice(cpu),
175 (launch_proc_t)MAPPED_KERN_RW_TO_K0(smp_bootstrap), 175 (launch_proc_t)MAPPED_KERN_RW_TO_K0(smp_bootstrap),
diff --git a/arch/mips/sibyte/cfe/smp.c b/arch/mips/sibyte/cfe/smp.c
index e8485124b8fc..4477af3d8074 100644
--- a/arch/mips/sibyte/cfe/smp.c
+++ b/arch/mips/sibyte/cfe/smp.c
@@ -60,7 +60,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
60 60
61 retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap, 61 retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap,
62 __KSTK_TOS(idle), 62 __KSTK_TOS(idle),
63 (unsigned long)idle->thread_info, 0); 63 (unsigned long)task_thread_info(idle), 0);
64 if (retval != 0) 64 if (retval != 0)
65 printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval); 65 printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
66} 66}