Lines Matching refs:current
244 flush_fp_to_thread(current); in prepare_save_user_regs()
246 if (current->thread.used_vr) in prepare_save_user_regs()
247 flush_altivec_to_thread(current); in prepare_save_user_regs()
249 current->thread.vrsave = mfspr(SPRN_VRSAVE); in prepare_save_user_regs()
252 if (current->thread.used_vsr && ctx_has_vsx_region) in prepare_save_user_regs()
253 flush_vsx_to_thread(current); in prepare_save_user_regs()
256 if (current->thread.used_spe) in prepare_save_user_regs()
257 flush_spe_to_thread(current); in prepare_save_user_regs()
271 if (current->thread.used_vr) { in __unsafe_save_user_regs()
272 unsafe_copy_to_user(&frame->mc_vregs, ¤t->thread.vr_state, in __unsafe_save_user_regs()
286 unsafe_put_user(current->thread.vrsave, (u32 __user *)&frame->mc_vregs[32], in __unsafe_save_user_regs()
289 unsafe_copy_fpr_to_user(&frame->mc_fregs, current, failed); in __unsafe_save_user_regs()
303 if (current->thread.used_vsr && ctx_has_vsx_region) { in __unsafe_save_user_regs()
304 unsafe_copy_vsx_to_user(&frame->mc_vsregs, current, failed); in __unsafe_save_user_regs()
310 if (current->thread.used_spe) { in __unsafe_save_user_regs()
311 unsafe_copy_to_user(&frame->mc_vregs, current->thread.evr, in __unsafe_save_user_regs()
320 unsafe_put_user(current->thread.spefscr, in __unsafe_save_user_regs()
358 current->thread.ckvrsave = mfspr(SPRN_VRSAVE); in prepare_save_tm_user_regs()
365 unsafe_save_general_regs(¤t->thread.ckpt_regs, frame, failed); in save_tm_user_regs_unsafe()
377 if (current->thread.used_vr) { in save_tm_user_regs_unsafe()
378 unsafe_copy_to_user(&frame->mc_vregs, ¤t->thread.ckvr_state, in save_tm_user_regs_unsafe()
382 ¤t->thread.vr_state, in save_tm_user_regs_unsafe()
386 ¤t->thread.ckvr_state, in save_tm_user_regs_unsafe()
400 unsafe_put_user(current->thread.ckvrsave, in save_tm_user_regs_unsafe()
403 unsafe_put_user(current->thread.vrsave, in save_tm_user_regs_unsafe()
406 unsafe_put_user(current->thread.ckvrsave, in save_tm_user_regs_unsafe()
409 unsafe_copy_ckfpr_to_user(&frame->mc_fregs, current, failed); in save_tm_user_regs_unsafe()
411 unsafe_copy_fpr_to_user(&tm_frame->mc_fregs, current, failed); in save_tm_user_regs_unsafe()
413 unsafe_copy_ckfpr_to_user(&tm_frame->mc_fregs, current, failed); in save_tm_user_regs_unsafe()
421 if (current->thread.used_vsr) { in save_tm_user_regs_unsafe()
422 unsafe_copy_ckvsx_to_user(&frame->mc_vsregs, current, failed); in save_tm_user_regs_unsafe()
424 unsafe_copy_vsx_to_user(&tm_frame->mc_vsregs, current, failed); in save_tm_user_regs_unsafe()
426 unsafe_copy_ckvsx_to_user(&tm_frame->mc_vsregs, current, failed); in save_tm_user_regs_unsafe()
492 unsafe_copy_from_user(¤t->thread.vr_state, &sr->mc_vregs, in restore_user_regs()
494 current->thread.used_vr = true; in restore_user_regs()
495 } else if (current->thread.used_vr) in restore_user_regs()
496 memset(¤t->thread.vr_state, 0, in restore_user_regs()
500 unsafe_get_user(current->thread.vrsave, (u32 __user *)&sr->mc_vregs[32], failed); in restore_user_regs()
502 mtspr(SPRN_VRSAVE, current->thread.vrsave); in restore_user_regs()
504 unsafe_copy_fpr_from_user(current, &sr->mc_fregs, failed); in restore_user_regs()
517 unsafe_copy_vsx_from_user(current, &sr->mc_vsregs, failed); in restore_user_regs()
518 current->thread.used_vsr = true; in restore_user_regs()
519 } else if (current->thread.used_vsr) in restore_user_regs()
521 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_user_regs()
535 unsafe_copy_from_user(current->thread.evr, &sr->mc_vregs, in restore_user_regs()
537 current->thread.used_spe = true; in restore_user_regs()
538 } else if (current->thread.used_spe) in restore_user_regs()
539 memset(current->thread.evr, 0, ELF_NEVRREG * sizeof(u32)); in restore_user_regs()
542 unsafe_get_user(current->thread.spefscr, (u32 __user *)&sr->mc_vregs + ELF_NEVRREG, failed); in restore_user_regs()
578 unsafe_restore_general_regs(¤t->thread.ckpt_regs, sr, failed); in restore_tm_user_regs()
579 unsafe_get_user(current->thread.tm_tfhar, &sr->mc_gregs[PT_NIP], failed); in restore_tm_user_regs()
588 unsafe_copy_from_user(¤t->thread.ckvr_state, &sr->mc_vregs, in restore_tm_user_regs()
590 current->thread.used_vr = true; in restore_tm_user_regs()
591 } else if (current->thread.used_vr) { in restore_tm_user_regs()
592 memset(¤t->thread.vr_state, 0, in restore_tm_user_regs()
594 memset(¤t->thread.ckvr_state, 0, in restore_tm_user_regs()
599 unsafe_get_user(current->thread.ckvrsave, in restore_tm_user_regs()
602 mtspr(SPRN_VRSAVE, current->thread.ckvrsave); in restore_tm_user_regs()
606 unsafe_copy_fpr_from_user(current, &sr->mc_fregs, failed); in restore_tm_user_regs()
614 unsafe_copy_ckvsx_from_user(current, &sr->mc_vsregs, failed); in restore_tm_user_regs()
615 current->thread.used_vsr = true; in restore_tm_user_regs()
616 } else if (current->thread.used_vsr) in restore_tm_user_regs()
618 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_tm_user_regs()
619 current->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = 0; in restore_tm_user_regs()
631 unsafe_copy_from_user(¤t->thread.vr_state, &tm_sr->mc_vregs, in restore_tm_user_regs()
635 unsafe_get_user(current->thread.vrsave, in restore_tm_user_regs()
638 unsafe_copy_ckfpr_from_user(current, &tm_sr->mc_fregs, failed); in restore_tm_user_regs()
645 unsafe_copy_vsx_from_user(current, &tm_sr->mc_vsregs, failed); in restore_tm_user_regs()
646 current->thread.used_vsr = true; in restore_tm_user_regs()
682 current->thread.tm_texasr |= TEXASR_FS; in restore_tm_user_regs()
684 tm_recheckpoint(¤t->thread); in restore_tm_user_regs()
689 load_fp_state(¤t->thread.fp_state); in restore_tm_user_regs()
690 regs_set_return_msr(regs, regs->msr | (MSR_FP | current->thread.fpexc_mode)); in restore_tm_user_regs()
693 load_vr_state(¤t->thread.vr_state); in restore_tm_user_regs()
1044 unsafe_put_sigset_t(&old_ctx->uc_sigmask, ¤t->blocked, failed); in COMPAT_SYSCALL_DEFINE3()
1093 current->restart_block.fn = do_no_restart_syscall; in COMPAT_SYSCALL_DEFINE0()
1173 signal_fault(current, regs, "sys_rt_sigreturn", rt_sf); in COMPAT_SYSCALL_DEFINE0()
1188 unsigned long new_dbcr0 = current->thread.debug.dbcr0; in SYSCALL_DEFINE3()
1203 current->thread.debug.dbcr1)) { in SYSCALL_DEFINE3()
1238 current->thread.debug.dbcr0 = new_dbcr0; in SYSCALL_DEFINE3()
1257 signal_fault(current, regs, "sys_debug_setcontext", ctx); in SYSCALL_DEFINE3()
1298 current->restart_block.fn = do_no_restart_syscall; in COMPAT_SYSCALL_DEFINE0()
1331 signal_fault(current, regs, "sys_sigreturn", sr); in COMPAT_SYSCALL_DEFINE0()
1342 signal_fault(current, regs, "sys_sigreturn", sc); in COMPAT_SYSCALL_DEFINE0()