Lines Matching refs:target

58 int tm_cgpr_active(struct task_struct *target, const struct user_regset *regset)  in tm_cgpr_active()  argument
63 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_active()
86 int tm_cgpr_get(struct task_struct *target, const struct user_regset *regset, in tm_cgpr_get() argument
97 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_get()
100 flush_tmregs_to_thread(target); in tm_cgpr_get()
101 flush_fp_to_thread(target); in tm_cgpr_get()
102 flush_altivec_to_thread(target); in tm_cgpr_get()
104 membuf_write(&to, &target->thread.ckpt_regs, sizeof(struct user_pt_regs)); in tm_cgpr_get()
106 membuf_store(&to_msr, get_user_ckpt_msr(target)); in tm_cgpr_get()
134 int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset, in tm_cgpr_set() argument
144 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_set()
147 flush_tmregs_to_thread(target); in tm_cgpr_set()
148 flush_fp_to_thread(target); in tm_cgpr_set()
149 flush_altivec_to_thread(target); in tm_cgpr_set()
152 &target->thread.ckpt_regs, in tm_cgpr_set()
160 ret = set_user_ckpt_msr(target, reg); in tm_cgpr_set()
168 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_set()
182 ret = set_user_ckpt_trap(target, reg); in tm_cgpr_set()
200 int tm_cfpr_active(struct task_struct *target, const struct user_regset *regset) in tm_cfpr_active() argument
205 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_active()
229 int tm_cfpr_get(struct task_struct *target, const struct user_regset *regset, in tm_cfpr_get() argument
238 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_get()
241 flush_tmregs_to_thread(target); in tm_cfpr_get()
242 flush_fp_to_thread(target); in tm_cfpr_get()
243 flush_altivec_to_thread(target); in tm_cfpr_get()
247 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_get()
248 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_get()
273 int tm_cfpr_set(struct task_struct *target, const struct user_regset *regset, in tm_cfpr_set() argument
283 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_set()
286 flush_tmregs_to_thread(target); in tm_cfpr_set()
287 flush_fp_to_thread(target); in tm_cfpr_set()
288 flush_altivec_to_thread(target); in tm_cfpr_set()
291 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_set()
292 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_set()
299 target->thread.TS_CKFPR(i) = buf[i]; in tm_cfpr_set()
300 target->thread.ckfp_state.fpscr = buf[32]; in tm_cfpr_set()
312 int tm_cvmx_active(struct task_struct *target, const struct user_regset *regset) in tm_cvmx_active() argument
317 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_active()
342 int tm_cvmx_get(struct task_struct *target, const struct user_regset *regset, in tm_cvmx_get() argument
354 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_get()
358 flush_tmregs_to_thread(target); in tm_cvmx_get()
359 flush_fp_to_thread(target); in tm_cvmx_get()
360 flush_altivec_to_thread(target); in tm_cvmx_get()
362 membuf_write(&to, &target->thread.ckvr_state, 33 * sizeof(vector128)); in tm_cvmx_get()
367 vrsave.word = target->thread.ckvrsave; in tm_cvmx_get()
393 int tm_cvmx_set(struct task_struct *target, const struct user_regset *regset, in tm_cvmx_set() argument
404 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_set()
407 flush_tmregs_to_thread(target); in tm_cvmx_set()
408 flush_fp_to_thread(target); in tm_cvmx_set()
409 flush_altivec_to_thread(target); in tm_cvmx_set()
411 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.ckvr_state, in tm_cvmx_set()
422 vrsave.word = target->thread.ckvrsave; in tm_cvmx_set()
426 target->thread.ckvrsave = vrsave.word; in tm_cvmx_set()
440 int tm_cvsx_active(struct task_struct *target, const struct user_regset *regset) in tm_cvsx_active() argument
445 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_active()
448 flush_vsx_to_thread(target); in tm_cvsx_active()
449 return target->thread.used_vsr ? regset->n : 0; in tm_cvsx_active()
469 int tm_cvsx_get(struct task_struct *target, const struct user_regset *regset, in tm_cvsx_get() argument
478 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_get()
482 flush_tmregs_to_thread(target); in tm_cvsx_get()
483 flush_fp_to_thread(target); in tm_cvsx_get()
484 flush_altivec_to_thread(target); in tm_cvsx_get()
485 flush_vsx_to_thread(target); in tm_cvsx_get()
488 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_get()
512 int tm_cvsx_set(struct task_struct *target, const struct user_regset *regset, in tm_cvsx_set() argument
522 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_set()
526 flush_tmregs_to_thread(target); in tm_cvsx_set()
527 flush_fp_to_thread(target); in tm_cvsx_set()
528 flush_altivec_to_thread(target); in tm_cvsx_set()
529 flush_vsx_to_thread(target); in tm_cvsx_set()
532 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_set()
538 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in tm_cvsx_set()
551 int tm_spr_active(struct task_struct *target, const struct user_regset *regset) in tm_spr_active() argument
574 int tm_spr_get(struct task_struct *target, const struct user_regset *regset, in tm_spr_get() argument
586 flush_tmregs_to_thread(target); in tm_spr_get()
587 flush_fp_to_thread(target); in tm_spr_get()
588 flush_altivec_to_thread(target); in tm_spr_get()
591 membuf_write(&to, &target->thread.tm_tfhar, sizeof(u64)); in tm_spr_get()
593 membuf_write(&to, &target->thread.tm_texasr, sizeof(u64)); in tm_spr_get()
595 return membuf_write(&to, &target->thread.tm_tfiar, sizeof(u64)); in tm_spr_get()
616 int tm_spr_set(struct task_struct *target, const struct user_regset *regset, in tm_spr_set() argument
631 flush_tmregs_to_thread(target); in tm_spr_set()
632 flush_fp_to_thread(target); in tm_spr_set()
633 flush_altivec_to_thread(target); in tm_spr_set()
637 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_set()
642 &target->thread.tm_texasr, sizeof(u64), in tm_spr_set()
648 &target->thread.tm_tfiar, in tm_spr_set()
653 int tm_tar_active(struct task_struct *target, const struct user_regset *regset) in tm_tar_active() argument
658 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_active()
664 int tm_tar_get(struct task_struct *target, const struct user_regset *regset, in tm_tar_get() argument
670 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_get()
673 return membuf_write(&to, &target->thread.tm_tar, sizeof(u64)); in tm_tar_get()
676 int tm_tar_set(struct task_struct *target, const struct user_regset *regset, in tm_tar_set() argument
685 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_set()
689 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_set()
693 int tm_ppr_active(struct task_struct *target, const struct user_regset *regset) in tm_ppr_active() argument
698 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_active()
705 int tm_ppr_get(struct task_struct *target, const struct user_regset *regset, in tm_ppr_get() argument
711 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_get()
714 return membuf_write(&to, &target->thread.tm_ppr, sizeof(u64)); in tm_ppr_get()
717 int tm_ppr_set(struct task_struct *target, const struct user_regset *regset, in tm_ppr_set() argument
726 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_set()
730 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_set()
734 int tm_dscr_active(struct task_struct *target, const struct user_regset *regset) in tm_dscr_active() argument
739 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_active()
745 int tm_dscr_get(struct task_struct *target, const struct user_regset *regset, in tm_dscr_get() argument
751 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_get()
754 return membuf_write(&to, &target->thread.tm_dscr, sizeof(u64)); in tm_dscr_get()
757 int tm_dscr_set(struct task_struct *target, const struct user_regset *regset, in tm_dscr_set() argument
766 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_set()
770 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_set()
774 int tm_cgpr32_get(struct task_struct *target, const struct user_regset *regset, in tm_cgpr32_get() argument
777 gpr32_get_common(target, regset, to, in tm_cgpr32_get()
778 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_get()
782 int tm_cgpr32_set(struct task_struct *target, const struct user_regset *regset, in tm_cgpr32_set() argument
786 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in tm_cgpr32_set()
787 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_set()