Lines Matching full:current
234 * Save the current user registers on the user stack.
245 flush_fp_to_thread(current); in save_user_regs()
253 if (current->thread.used_vr) { in save_user_regs()
254 flush_altivec_to_thread(current); in save_user_regs()
255 if (__copy_to_user(&frame->mc_vregs, ¤t->thread.vr_state, in save_user_regs()
268 * Note that the current VRSAVE value is in the SPR at this point. in save_user_regs()
271 current->thread.vrsave = mfspr(SPRN_VRSAVE); in save_user_regs()
272 if (__put_user(current->thread.vrsave, (u32 __user *)&frame->mc_vregs[32])) in save_user_regs()
275 if (copy_fpr_to_user(&frame->mc_fregs, current)) in save_user_regs()
290 if (current->thread.used_vsr && ctx_has_vsx_region) { in save_user_regs()
291 flush_vsx_to_thread(current); in save_user_regs()
292 if (copy_vsx_to_user(&frame->mc_vsregs, current)) in save_user_regs()
299 if (current->thread.used_spe) { in save_user_regs()
300 flush_spe_to_thread(current); in save_user_regs()
301 if (__copy_to_user(&frame->mc_vregs, current->thread.evr, in save_user_regs()
311 if (__put_user(current->thread.spefscr, (u32 __user *)&frame->mc_vregs + ELF_NEVRREG)) in save_user_regs()
337 * Save the current user registers on the user stack.
353 if (save_general_regs(¤t->thread.ckpt_regs, frame) in save_tm_user_regs()
368 if (current->thread.used_vr) { in save_tm_user_regs()
369 if (__copy_to_user(&frame->mc_vregs, ¤t->thread.ckvr_state, in save_tm_user_regs()
374 ¤t->thread.vr_state, in save_tm_user_regs()
379 ¤t->thread.ckvr_state, in save_tm_user_regs()
396 current->thread.ckvrsave = mfspr(SPRN_VRSAVE); in save_tm_user_regs()
397 if (__put_user(current->thread.ckvrsave, in save_tm_user_regs()
401 if (__put_user(current->thread.vrsave, in save_tm_user_regs()
405 if (__put_user(current->thread.ckvrsave, in save_tm_user_regs()
411 if (copy_ckfpr_to_user(&frame->mc_fregs, current)) in save_tm_user_regs()
414 if (copy_fpr_to_user(&tm_frame->mc_fregs, current)) in save_tm_user_regs()
417 if (copy_ckfpr_to_user(&tm_frame->mc_fregs, current)) in save_tm_user_regs()
428 if (current->thread.used_vsr) { in save_tm_user_regs()
429 if (copy_ckvsx_to_user(&frame->mc_vsregs, current)) in save_tm_user_regs()
433 current)) in save_tm_user_regs()
436 if (copy_ckvsx_to_user(&tm_frame->mc_vsregs, current)) in save_tm_user_regs()
447 if (current->thread.used_spe) { in save_tm_user_regs()
448 flush_spe_to_thread(current); in save_tm_user_regs()
449 if (__copy_to_user(&frame->mc_vregs, current->thread.evr, in save_tm_user_regs()
458 if (__put_user(current->thread.spefscr, (u32 __user *)&frame->mc_vregs + ELF_NEVRREG)) in save_tm_user_regs()
478 * Restore the current user register values from the user stack,
512 * current->thread when it next does altivec instructions in restore_user_regs()
517 if (__copy_from_user(¤t->thread.vr_state, &sr->mc_vregs, in restore_user_regs()
520 current->thread.used_vr = true; in restore_user_regs()
521 } else if (current->thread.used_vr) in restore_user_regs()
522 memset(¤t->thread.vr_state, 0, in restore_user_regs()
526 if (__get_user(current->thread.vrsave, (u32 __user *)&sr->mc_vregs[32])) in restore_user_regs()
529 mtspr(SPRN_VRSAVE, current->thread.vrsave); in restore_user_regs()
531 if (copy_fpr_from_user(current, &sr->mc_fregs)) in restore_user_regs()
537 * current->thread when it next does VSX instruction. in restore_user_regs()
545 if (copy_vsx_from_user(current, &sr->mc_vsregs)) in restore_user_regs()
547 current->thread.used_vsr = true; in restore_user_regs()
548 } else if (current->thread.used_vsr) in restore_user_regs()
550 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_user_regs()
554 * current->thread when it next does FP instructions in restore_user_regs()
560 current->thread when it next does spe instructions */ in restore_user_regs()
564 if (__copy_from_user(current->thread.evr, &sr->mc_vregs, in restore_user_regs()
567 current->thread.used_spe = true; in restore_user_regs()
568 } else if (current->thread.used_spe) in restore_user_regs()
569 memset(current->thread.evr, 0, ELF_NEVRREG * sizeof(u32)); in restore_user_regs()
572 if (__get_user(current->thread.spefscr, (u32 __user *)&sr->mc_vregs + ELF_NEVRREG)) in restore_user_regs()
581 * Restore the current user register values from the user stack, except for
605 err |= restore_general_regs(¤t->thread.ckpt_regs, sr); in restore_tm_user_regs()
607 err |= __get_user(current->thread.tm_tfhar, &sr->mc_gregs[PT_NIP]); in restore_tm_user_regs()
620 if (__copy_from_user(¤t->thread.ckvr_state, &sr->mc_vregs, in restore_tm_user_regs()
622 __copy_from_user(¤t->thread.vr_state, in restore_tm_user_regs()
626 current->thread.used_vr = true; in restore_tm_user_regs()
627 } else if (current->thread.used_vr) { in restore_tm_user_regs()
628 memset(¤t->thread.vr_state, 0, in restore_tm_user_regs()
630 memset(¤t->thread.ckvr_state, 0, in restore_tm_user_regs()
635 if (__get_user(current->thread.ckvrsave, in restore_tm_user_regs()
637 __get_user(current->thread.vrsave, in restore_tm_user_regs()
641 mtspr(SPRN_VRSAVE, current->thread.ckvrsave); in restore_tm_user_regs()
646 if (copy_fpr_from_user(current, &sr->mc_fregs) || in restore_tm_user_regs()
647 copy_ckfpr_from_user(current, &tm_sr->mc_fregs)) in restore_tm_user_regs()
657 if (copy_vsx_from_user(current, &tm_sr->mc_vsregs) || in restore_tm_user_regs()
658 copy_ckvsx_from_user(current, &sr->mc_vsregs)) in restore_tm_user_regs()
660 current->thread.used_vsr = true; in restore_tm_user_regs()
661 } else if (current->thread.used_vsr) in restore_tm_user_regs()
663 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_tm_user_regs()
664 current->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_tm_user_regs()
674 if (__copy_from_user(current->thread.evr, &sr->mc_vregs, in restore_tm_user_regs()
677 current->thread.used_spe = true; in restore_tm_user_regs()
678 } else if (current->thread.used_spe) in restore_tm_user_regs()
679 memset(current->thread.evr, 0, ELF_NEVRREG * sizeof(u32)); in restore_tm_user_regs()
682 if (__get_user(current->thread.spefscr, (u32 __user *)&sr->mc_vregs in restore_tm_user_regs()
718 current->thread.tm_texasr |= TEXASR_FS; in restore_tm_user_regs()
720 tm_recheckpoint(¤t->thread); in restore_tm_user_regs()
725 load_fp_state(¤t->thread.fp_state); in restore_tm_user_regs()
726 regs->msr |= (MSR_FP | current->thread.fpexc_mode); in restore_tm_user_regs()
730 load_vr_state(¤t->thread.vr_state); in restore_tm_user_regs()
767 BUG_ON(tsk != current); in handle_rt_signal32()
972 || put_sigset_t(&old_ctx->uc_sigmask, ¤t->blocked) in COMPAT_SYSCALL_DEFINE3()
1015 current->restart_block.fn = do_no_restart_syscall; in COMPAT_SYSCALL_DEFINE0()
1099 current->comm, current->pid, in COMPAT_SYSCALL_DEFINE0()
1115 unsigned long new_dbcr0 = current->thread.debug.dbcr0; in SYSCALL_DEFINE3()
1130 current->thread.debug.dbcr1)) { in SYSCALL_DEFINE3()
1165 current->thread.debug.dbcr0 = new_dbcr0; in SYSCALL_DEFINE3()
1188 current->comm, current->pid, in SYSCALL_DEFINE3()
1228 BUG_ON(tsk != current); in handle_signal32()
1322 current->restart_block.fn = do_no_restart_syscall; in COMPAT_SYSCALL_DEFINE0()
1370 current->comm, current->pid, in COMPAT_SYSCALL_DEFINE0()