diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:05:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:52 -0500 |
commit | f3169641c12d2c5abdab863f5393a3f3534788dd (patch) | |
tree | a455f38f7ac748c3e334d1105d16a0f94a4c0e57 | |
parent | 65e0fdffc977e69a8f1f26d4bf8ba30984db7e44 (diff) |
[PATCH] sparc64: 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>
-rw-r--r-- | arch/sparc64/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/ptrace.c | 34 | ||||
-rw-r--r-- | arch/sparc64/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 2 | ||||
-rw-r--r-- | include/asm-sparc64/mmu_context.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/system.h | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 02f9dec1d459..1bc772477079 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -390,7 +390,7 @@ void show_regs32(struct pt_regs32 *regs) | |||
390 | 390 | ||
391 | unsigned long thread_saved_pc(struct task_struct *tsk) | 391 | unsigned long thread_saved_pc(struct task_struct *tsk) |
392 | { | 392 | { |
393 | struct thread_info *ti = tsk->thread_info; | 393 | struct thread_info *ti = task_thread_info(tsk); |
394 | unsigned long ret = 0xdeadbeefUL; | 394 | unsigned long ret = 0xdeadbeefUL; |
395 | 395 | ||
396 | if (ti && ti->ksp) { | 396 | if (ti && ti->ksp) { |
@@ -847,7 +847,7 @@ unsigned long get_wchan(struct task_struct *task) | |||
847 | 847 | ||
848 | thread_info_base = (unsigned long) task->thread_info; | 848 | thread_info_base = (unsigned long) task->thread_info; |
849 | bias = STACK_BIAS; | 849 | bias = STACK_BIAS; |
850 | fp = task->thread_info->ksp + bias; | 850 | fp = task_thread_info(task)->ksp + bias; |
851 | 851 | ||
852 | do { | 852 | do { |
853 | /* Bogus frame pointer? */ | 853 | /* Bogus frame pointer? */ |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index 84d3df2264cb..3e4077c84a23 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -324,7 +324,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
324 | unsigned long tpc = cregs->tpc; | 324 | unsigned long tpc = cregs->tpc; |
325 | int rval; | 325 | int rval; |
326 | 326 | ||
327 | if ((child->thread_info->flags & _TIF_32BIT) != 0) | 327 | if ((task_thread_info(child)->flags & _TIF_32BIT) != 0) |
328 | tpc &= 0xffffffff; | 328 | tpc &= 0xffffffff; |
329 | if (__put_user(cregs->tstate, (&pregs->tstate)) || | 329 | if (__put_user(cregs->tstate, (&pregs->tstate)) || |
330 | __put_user(tpc, (&pregs->tpc)) || | 330 | __put_user(tpc, (&pregs->tpc)) || |
@@ -395,7 +395,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
395 | pt_error_return(regs, EFAULT); | 395 | pt_error_return(regs, EFAULT); |
396 | goto out_tsk; | 396 | goto out_tsk; |
397 | } | 397 | } |
398 | if ((child->thread_info->flags & _TIF_32BIT) != 0) { | 398 | if ((task_thread_info(child)->flags & _TIF_32BIT) != 0) { |
399 | tpc &= 0xffffffff; | 399 | tpc &= 0xffffffff; |
400 | tnpc &= 0xffffffff; | 400 | tnpc &= 0xffffffff; |
401 | } | 401 | } |
@@ -430,11 +430,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
430 | } fpq[16]; | 430 | } fpq[16]; |
431 | }; | 431 | }; |
432 | struct fps __user *fps = (struct fps __user *) addr; | 432 | struct fps __user *fps = (struct fps __user *) addr; |
433 | unsigned long *fpregs = child->thread_info->fpregs; | 433 | unsigned long *fpregs = task_thread_info(child)->fpregs; |
434 | 434 | ||
435 | if (copy_to_user(&fps->regs[0], fpregs, | 435 | if (copy_to_user(&fps->regs[0], fpregs, |
436 | (32 * sizeof(unsigned int))) || | 436 | (32 * sizeof(unsigned int))) || |
437 | __put_user(child->thread_info->xfsr[0], (&fps->fsr)) || | 437 | __put_user(task_thread_info(child)->xfsr[0], (&fps->fsr)) || |
438 | __put_user(0, (&fps->fpqd)) || | 438 | __put_user(0, (&fps->fpqd)) || |
439 | __put_user(0, (&fps->flags)) || | 439 | __put_user(0, (&fps->flags)) || |
440 | __put_user(0, (&fps->extra)) || | 440 | __put_user(0, (&fps->extra)) || |
@@ -452,11 +452,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
452 | unsigned long fsr; | 452 | unsigned long fsr; |
453 | }; | 453 | }; |
454 | struct fps __user *fps = (struct fps __user *) addr; | 454 | struct fps __user *fps = (struct fps __user *) addr; |
455 | unsigned long *fpregs = child->thread_info->fpregs; | 455 | unsigned long *fpregs = task_thread_info(child)->fpregs; |
456 | 456 | ||
457 | if (copy_to_user(&fps->regs[0], fpregs, | 457 | if (copy_to_user(&fps->regs[0], fpregs, |
458 | (64 * sizeof(unsigned int))) || | 458 | (64 * sizeof(unsigned int))) || |
459 | __put_user(child->thread_info->xfsr[0], (&fps->fsr))) { | 459 | __put_user(task_thread_info(child)->xfsr[0], (&fps->fsr))) { |
460 | pt_error_return(regs, EFAULT); | 460 | pt_error_return(regs, EFAULT); |
461 | goto out_tsk; | 461 | goto out_tsk; |
462 | } | 462 | } |
@@ -477,7 +477,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
477 | } fpq[16]; | 477 | } fpq[16]; |
478 | }; | 478 | }; |
479 | struct fps __user *fps = (struct fps __user *) addr; | 479 | struct fps __user *fps = (struct fps __user *) addr; |
480 | unsigned long *fpregs = child->thread_info->fpregs; | 480 | unsigned long *fpregs = task_thread_info(child)->fpregs; |
481 | unsigned fsr; | 481 | unsigned fsr; |
482 | 482 | ||
483 | if (copy_from_user(fpregs, &fps->regs[0], | 483 | if (copy_from_user(fpregs, &fps->regs[0], |
@@ -486,11 +486,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
486 | pt_error_return(regs, EFAULT); | 486 | pt_error_return(regs, EFAULT); |
487 | goto out_tsk; | 487 | goto out_tsk; |
488 | } | 488 | } |
489 | child->thread_info->xfsr[0] &= 0xffffffff00000000UL; | 489 | task_thread_info(child)->xfsr[0] &= 0xffffffff00000000UL; |
490 | child->thread_info->xfsr[0] |= fsr; | 490 | task_thread_info(child)->xfsr[0] |= fsr; |
491 | if (!(child->thread_info->fpsaved[0] & FPRS_FEF)) | 491 | if (!(task_thread_info(child)->fpsaved[0] & FPRS_FEF)) |
492 | child->thread_info->gsr[0] = 0; | 492 | task_thread_info(child)->gsr[0] = 0; |
493 | child->thread_info->fpsaved[0] |= (FPRS_FEF | FPRS_DL); | 493 | task_thread_info(child)->fpsaved[0] |= (FPRS_FEF | FPRS_DL); |
494 | pt_succ_return(regs, 0); | 494 | pt_succ_return(regs, 0); |
495 | goto out_tsk; | 495 | goto out_tsk; |
496 | } | 496 | } |
@@ -501,17 +501,17 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
501 | unsigned long fsr; | 501 | unsigned long fsr; |
502 | }; | 502 | }; |
503 | struct fps __user *fps = (struct fps __user *) addr; | 503 | struct fps __user *fps = (struct fps __user *) addr; |
504 | unsigned long *fpregs = child->thread_info->fpregs; | 504 | unsigned long *fpregs = task_thread_info(child)->fpregs; |
505 | 505 | ||
506 | if (copy_from_user(fpregs, &fps->regs[0], | 506 | if (copy_from_user(fpregs, &fps->regs[0], |
507 | (64 * sizeof(unsigned int))) || | 507 | (64 * sizeof(unsigned int))) || |
508 | __get_user(child->thread_info->xfsr[0], (&fps->fsr))) { | 508 | __get_user(task_thread_info(child)->xfsr[0], (&fps->fsr))) { |
509 | pt_error_return(regs, EFAULT); | 509 | pt_error_return(regs, EFAULT); |
510 | goto out_tsk; | 510 | goto out_tsk; |
511 | } | 511 | } |
512 | if (!(child->thread_info->fpsaved[0] & FPRS_FEF)) | 512 | if (!(task_thread_info(child)->fpsaved[0] & FPRS_FEF)) |
513 | child->thread_info->gsr[0] = 0; | 513 | task_thread_info(child)->gsr[0] = 0; |
514 | child->thread_info->fpsaved[0] |= (FPRS_FEF | FPRS_DL | FPRS_DU); | 514 | task_thread_info(child)->fpsaved[0] |= (FPRS_FEF | FPRS_DL | FPRS_DU); |
515 | pt_succ_return(regs, 0); | 515 | pt_succ_return(regs, 0); |
516 | goto out_tsk; | 516 | goto out_tsk; |
517 | } | 517 | } |
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 48180531562f..250745896aee 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -520,7 +520,7 @@ void __init setup_arch(char **cmdline_p) | |||
520 | rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0); | 520 | rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0); |
521 | #endif | 521 | #endif |
522 | 522 | ||
523 | init_task.thread_info->kregs = &fake_swapper_regs; | 523 | task_thread_info(&init_task)->kregs = &fake_swapper_regs; |
524 | 524 | ||
525 | #ifdef CONFIG_IP_PNP | 525 | #ifdef CONFIG_IP_PNP |
526 | if (!ic_set_manually) { | 526 | if (!ic_set_manually) { |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 6efc03df51c3..1fb6323e65a4 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -335,7 +335,7 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu) | |||
335 | 335 | ||
336 | p = fork_idle(cpu); | 336 | p = fork_idle(cpu); |
337 | callin_flag = 0; | 337 | callin_flag = 0; |
338 | cpu_new_thread = p->thread_info; | 338 | cpu_new_thread = task_thread_info(p); |
339 | cpu_set(cpu, cpu_callout_map); | 339 | cpu_set(cpu, cpu_callout_map); |
340 | 340 | ||
341 | cpu_find_by_mid(cpu, &cpu_node); | 341 | cpu_find_by_mid(cpu, &cpu_node); |
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 08ba72d7722c..57ee7b306189 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -60,7 +60,7 @@ do { \ | |||
60 | register unsigned long pgd_cache asm("o4"); \ | 60 | register unsigned long pgd_cache asm("o4"); \ |
61 | paddr = __pa((__mm)->pgd); \ | 61 | paddr = __pa((__mm)->pgd); \ |
62 | pgd_cache = 0UL; \ | 62 | pgd_cache = 0UL; \ |
63 | if ((__tsk)->thread_info->flags & _TIF_32BIT) \ | 63 | if (task_thread_info(__tsk)->flags & _TIF_32BIT) \ |
64 | pgd_cache = get_pgd_cache((__mm)->pgd); \ | 64 | pgd_cache = get_pgd_cache((__mm)->pgd); \ |
65 | __asm__ __volatile__("wrpr %%g0, 0x494, %%pstate\n\t" \ | 65 | __asm__ __volatile__("wrpr %%g0, 0x494, %%pstate\n\t" \ |
66 | "mov %3, %%g4\n\t" \ | 66 | "mov %3, %%g4\n\t" \ |
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 07d72367f82c..af254e581834 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h | |||
@@ -208,7 +208,7 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \ | |||
208 | /* If you are tempted to conditionalize the following */ \ | 208 | /* If you are tempted to conditionalize the following */ \ |
209 | /* so that ASI is only written if it changes, think again. */ \ | 209 | /* so that ASI is only written if it changes, think again. */ \ |
210 | __asm__ __volatile__("wr %%g0, %0, %%asi" \ | 210 | __asm__ __volatile__("wr %%g0, %0, %%asi" \ |
211 | : : "r" (__thread_flag_byte_ptr(next->thread_info)[TI_FLAG_BYTE_CURRENT_DS]));\ | 211 | : : "r" (__thread_flag_byte_ptr(task_thread_info(next))[TI_FLAG_BYTE_CURRENT_DS]));\ |
212 | __asm__ __volatile__( \ | 212 | __asm__ __volatile__( \ |
213 | "mov %%g4, %%g7\n\t" \ | 213 | "mov %%g4, %%g7\n\t" \ |
214 | "wrpr %%g0, 0x95, %%pstate\n\t" \ | 214 | "wrpr %%g0, 0x95, %%pstate\n\t" \ |
@@ -238,7 +238,7 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \ | |||
238 | "b,a ret_from_syscall\n\t" \ | 238 | "b,a ret_from_syscall\n\t" \ |
239 | "1:\n\t" \ | 239 | "1:\n\t" \ |
240 | : "=&r" (last) \ | 240 | : "=&r" (last) \ |
241 | : "0" (next->thread_info), \ | 241 | : "0" (task_thread_info(next)), \ |
242 | "i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_NEW_CHILD), \ | 242 | "i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_NEW_CHILD), \ |
243 | "i" (TI_CWP), "i" (TI_TASK) \ | 243 | "i" (TI_CWP), "i" (TI_TASK) \ |
244 | : "cc", \ | 244 | : "cc", \ |