aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
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/mips/kernel
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/mips/kernel')
-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
5 files changed, 8 insertions, 9 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)))