Lines Matching full:current
243 * Save the current user registers on the user stack.
250 flush_fp_to_thread(current); in prepare_save_user_regs()
252 if (current->thread.used_vr) in prepare_save_user_regs()
253 flush_altivec_to_thread(current); in prepare_save_user_regs()
255 current->thread.vrsave = mfspr(SPRN_VRSAVE); in prepare_save_user_regs()
258 if (current->thread.used_vsr && ctx_has_vsx_region) in prepare_save_user_regs()
259 flush_vsx_to_thread(current); in prepare_save_user_regs()
262 if (current->thread.used_spe) in prepare_save_user_regs()
263 flush_spe_to_thread(current); in prepare_save_user_regs()
278 if (current->thread.used_vr) { in __unsafe_save_user_regs()
279 unsafe_copy_to_user(&frame->mc_vregs, ¤t->thread.vr_state, in __unsafe_save_user_regs()
291 * Note that the current VRSAVE value is in the SPR at this point. in __unsafe_save_user_regs()
293 unsafe_put_user(current->thread.vrsave, (u32 __user *)&frame->mc_vregs[32], in __unsafe_save_user_regs()
296 unsafe_copy_fpr_to_user(&frame->mc_fregs, current, failed); in __unsafe_save_user_regs()
310 if (current->thread.used_vsr && ctx_has_vsx_region) { in __unsafe_save_user_regs()
311 unsafe_copy_vsx_to_user(&frame->mc_vsregs, current, failed); in __unsafe_save_user_regs()
317 if (current->thread.used_spe) { in __unsafe_save_user_regs()
318 unsafe_copy_to_user(&frame->mc_vregs, current->thread.evr, in __unsafe_save_user_regs()
327 unsafe_put_user(current->thread.spefscr, in __unsafe_save_user_regs()
352 * Save the current user registers on the user stack.
365 current->thread.ckvrsave = mfspr(SPRN_VRSAVE); in prepare_save_tm_user_regs()
373 unsafe_save_general_regs(¤t->thread.ckpt_regs, frame, failed); in save_tm_user_regs_unsafe()
385 if (current->thread.used_vr) { in save_tm_user_regs_unsafe()
386 unsafe_copy_to_user(&frame->mc_vregs, ¤t->thread.ckvr_state, in save_tm_user_regs_unsafe()
390 ¤t->thread.vr_state, in save_tm_user_regs_unsafe()
394 ¤t->thread.ckvr_state, in save_tm_user_regs_unsafe()
408 unsafe_put_user(current->thread.ckvrsave, in save_tm_user_regs_unsafe()
411 unsafe_put_user(current->thread.vrsave, in save_tm_user_regs_unsafe()
414 unsafe_put_user(current->thread.ckvrsave, in save_tm_user_regs_unsafe()
417 unsafe_copy_ckfpr_to_user(&frame->mc_fregs, current, failed); in save_tm_user_regs_unsafe()
419 unsafe_copy_fpr_to_user(&tm_frame->mc_fregs, current, failed); in save_tm_user_regs_unsafe()
421 unsafe_copy_ckfpr_to_user(&tm_frame->mc_fregs, current, failed); in save_tm_user_regs_unsafe()
429 if (current->thread.used_vsr) { in save_tm_user_regs_unsafe()
430 unsafe_copy_ckvsx_to_user(&frame->mc_vsregs, current, failed); in save_tm_user_regs_unsafe()
432 unsafe_copy_vsx_to_user(&tm_frame->mc_vsregs, current, failed); in save_tm_user_regs_unsafe()
434 unsafe_copy_ckvsx_to_user(&tm_frame->mc_vsregs, current, failed); in save_tm_user_regs_unsafe()
463 * Restore the current user register values from the user stack,
496 * current->thread when it next does altivec instructions in restore_user_regs()
501 unsafe_copy_from_user(¤t->thread.vr_state, &sr->mc_vregs, in restore_user_regs()
503 current->thread.used_vr = true; in restore_user_regs()
504 } else if (current->thread.used_vr) in restore_user_regs()
505 memset(¤t->thread.vr_state, 0, in restore_user_regs()
509 unsafe_get_user(current->thread.vrsave, (u32 __user *)&sr->mc_vregs[32], failed); in restore_user_regs()
511 mtspr(SPRN_VRSAVE, current->thread.vrsave); in restore_user_regs()
513 unsafe_copy_fpr_from_user(current, &sr->mc_fregs, failed); in restore_user_regs()
518 * current->thread when it next does VSX instruction. in restore_user_regs()
526 unsafe_copy_vsx_from_user(current, &sr->mc_vsregs, failed); in restore_user_regs()
527 current->thread.used_vsr = true; in restore_user_regs()
528 } else if (current->thread.used_vsr) in restore_user_regs()
530 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_user_regs()
534 * current->thread when it next does FP instructions in restore_user_regs()
541 * current->thread when it next does spe instructions. in restore_user_regs()
544 BUILD_BUG_ON(sizeof(current->thread.spe) != ELF_NEVRREG * sizeof(u32)); in restore_user_regs()
548 unsafe_copy_from_user(¤t->thread.spe, &sr->mc_vregs, in restore_user_regs()
549 sizeof(current->thread.spe), failed); in restore_user_regs()
550 current->thread.used_spe = true; in restore_user_regs()
551 } else if (current->thread.used_spe) in restore_user_regs()
552 memset(¤t->thread.spe, 0, sizeof(current->thread.spe)); in restore_user_regs()
555 unsafe_get_user(current->thread.spefscr, (u32 __user *)&sr->mc_vregs + ELF_NEVRREG, failed); in restore_user_regs()
568 * Restore the current user register values from the user stack, except for
591 unsafe_restore_general_regs(¤t->thread.ckpt_regs, sr, failed); in restore_tm_user_regs()
592 unsafe_get_user(current->thread.tm_tfhar, &sr->mc_gregs[PT_NIP], failed); in restore_tm_user_regs()
601 unsafe_copy_from_user(¤t->thread.ckvr_state, &sr->mc_vregs, in restore_tm_user_regs()
603 current->thread.used_vr = true; in restore_tm_user_regs()
604 } else if (current->thread.used_vr) { in restore_tm_user_regs()
605 memset(¤t->thread.vr_state, 0, in restore_tm_user_regs()
607 memset(¤t->thread.ckvr_state, 0, in restore_tm_user_regs()
612 unsafe_get_user(current->thread.ckvrsave, in restore_tm_user_regs()
615 mtspr(SPRN_VRSAVE, current->thread.ckvrsave); in restore_tm_user_regs()
619 unsafe_copy_fpr_from_user(current, &sr->mc_fregs, failed); in restore_tm_user_regs()
627 unsafe_copy_ckvsx_from_user(current, &sr->mc_vsregs, failed); in restore_tm_user_regs()
628 current->thread.used_vsr = true; in restore_tm_user_regs()
629 } else if (current->thread.used_vsr) in restore_tm_user_regs()
631 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_tm_user_regs()
632 current->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_tm_user_regs()
644 unsafe_copy_from_user(¤t->thread.vr_state, &tm_sr->mc_vregs, in restore_tm_user_regs()
648 unsafe_get_user(current->thread.vrsave, in restore_tm_user_regs()
651 unsafe_copy_ckfpr_from_user(current, &tm_sr->mc_fregs, failed); in restore_tm_user_regs()
658 unsafe_copy_vsx_from_user(current, &tm_sr->mc_vsregs, failed); in restore_tm_user_regs()
659 current->thread.used_vsr = true; in restore_tm_user_regs()
695 current->thread.tm_texasr |= TEXASR_FS; in restore_tm_user_regs()
697 tm_recheckpoint(¤t->thread); in restore_tm_user_regs()
702 load_fp_state(¤t->thread.fp_state); in restore_tm_user_regs()
703 regs_set_return_msr(regs, regs->msr | (MSR_FP | current->thread.fpexc_mode)); in restore_tm_user_regs()
706 load_vr_state(¤t->thread.vr_state); in restore_tm_user_regs()
1057 unsafe_put_sigset_t(&old_ctx->uc_sigmask, ¤t->blocked, failed); in COMPAT_SYSCALL_DEFINE3()
1106 current->restart_block.fn = do_no_restart_syscall; in COMPAT_SYSCALL_DEFINE0()
1186 signal_fault(current, regs, "sys_rt_sigreturn", rt_sf); in COMPAT_SYSCALL_DEFINE0()
1201 unsigned long new_dbcr0 = current->thread.debug.dbcr0; in SYSCALL_DEFINE3()
1216 current->thread.debug.dbcr1)) { in SYSCALL_DEFINE3()
1251 current->thread.debug.dbcr0 = new_dbcr0; in SYSCALL_DEFINE3()
1270 signal_fault(current, regs, "sys_debug_setcontext", ctx); in SYSCALL_DEFINE3()
1311 current->restart_block.fn = do_no_restart_syscall; in COMPAT_SYSCALL_DEFINE0()
1344 signal_fault(current, regs, "sys_sigreturn", sr); in COMPAT_SYSCALL_DEFINE0()
1355 signal_fault(current, regs, "sys_sigreturn", sc); in COMPAT_SYSCALL_DEFINE0()