[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>

authored by Al Viro and committed by Linus Torvalds dc8f6029 40bc9c67

+13 -14
+1 -1
arch/mips/kernel/ptrace.c
··· 438 438 break; 439 439 440 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 442 (unsigned long __user *) data); 443 443 break; 444 444
+2 -2
arch/mips/kernel/ptrace32.c
··· 375 375 break; 376 376 377 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 379 (unsigned int __user *) (unsigned long) data); 380 380 break; 381 381 ··· 389 389 break; 390 390 391 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 393 (unsigned long __user *) (unsigned long) data); 394 394 break; 395 395
+3 -4
arch/mips/kernel/smp_mt.c
··· 287 287 */ 288 288 void prom_boot_secondary(int cpu, struct task_struct *idle) 289 289 { 290 + struct thread_info *gp = task_thread_info(idle); 290 291 dvpe(); 291 292 set_c0_mvpcontrol(MVPCONTROL_VPC); 292 293 ··· 308 307 write_tc_gpr_sp( __KSTK_TOS(idle)); 309 308 310 309 /* global pointer */ 311 - write_tc_gpr_gp((unsigned long)idle->thread_info); 310 + write_tc_gpr_gp((unsigned long)gp); 312 311 313 - flush_icache_range((unsigned long)idle->thread_info, 314 - (unsigned long)idle->thread_info + 315 - sizeof(struct thread_info)); 312 + flush_icache_range((unsigned long)gp, (unsigned long)(gp + 1)); 316 313 317 314 /* finally out of configuration and into chaos */ 318 315 clear_c0_mvpcontrol(MVPCONTROL_VPC);
+1 -1
arch/mips/kernel/syscall.c
··· 263 263 264 264 void 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 268 ti->tp_value = addr; 269 269
+1 -1
arch/mips/kernel/traps.c
··· 519 519 */ 520 520 static 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 523 unsigned int opcode; 524 524 525 525 if (unlikely(get_insn_opcode(regs, &opcode)))
+2 -2
arch/mips/pmc-sierra/yosemite/smp.c
··· 93 93 */ 94 94 void prom_boot_secondary(int cpu, struct task_struct *idle) 95 95 { 96 - unsigned long gp = (unsigned long) idle->thread_info; 97 - unsigned long sp = gp + THREAD_SIZE - 32; 96 + unsigned long gp = (unsigned long) task_thread_info(idle); 97 + unsigned long sp = __KSTK_TOP(idle); 98 98 99 99 secondary_sp = sp; 100 100 secondary_gp = gp;
+2 -2
arch/mips/sgi-ip27/ip27-smp.c
··· 168 168 */ 169 169 void __init prom_boot_secondary(int cpu, struct task_struct *idle) 170 170 { 171 - unsigned long gp = (unsigned long) idle->thread_info; 172 - unsigned long sp = gp + THREAD_SIZE - 32; 171 + unsigned long gp = (unsigned long)task_thread_info(idle); 172 + unsigned long sp = __KSTK_TOS(idle); 173 173 174 174 LAUNCH_SLAVE(cputonasid(cpu),cputoslice(cpu), 175 175 (launch_proc_t)MAPPED_KERN_RW_TO_K0(smp_bootstrap),
+1 -1
arch/mips/sibyte/cfe/smp.c
··· 60 60 61 61 retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap, 62 62 __KSTK_TOS(idle), 63 - (unsigned long)idle->thread_info, 0); 63 + (unsigned long)task_thread_info(idle), 0); 64 64 if (retval != 0) 65 65 printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval); 66 66 }