Lines Matching full:target

52  * @target:	The target task.
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()
71 * @target: The target task.
86 int tm_cgpr_get(struct task_struct *target, const struct user_regset *regset, in tm_cgpr_get() argument
92 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_get()
95 flush_tmregs_to_thread(target); in tm_cgpr_get()
96 flush_fp_to_thread(target); in tm_cgpr_get()
97 flush_altivec_to_thread(target); in tm_cgpr_get()
99 membuf_write(&to, &target->thread.ckpt_regs, in tm_cgpr_get()
101 membuf_store(&to, get_user_ckpt_msr(target)); in tm_cgpr_get()
106 membuf_write(&to, &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_get()
115 * @target: The target task.
133 int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset, in tm_cgpr_set() argument
143 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_set()
146 flush_tmregs_to_thread(target); in tm_cgpr_set()
147 flush_fp_to_thread(target); in tm_cgpr_set()
148 flush_altivec_to_thread(target); in tm_cgpr_set()
151 &target->thread.ckpt_regs, in tm_cgpr_set()
159 ret = set_user_ckpt_msr(target, reg); in tm_cgpr_set()
167 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_set()
181 ret = set_user_ckpt_trap(target, reg); in tm_cgpr_set()
193 * @target: The target task.
199 int tm_cfpr_active(struct task_struct *target, const struct user_regset *regset) in tm_cfpr_active() argument
204 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_active()
212 * @target: The target task.
228 int tm_cfpr_get(struct task_struct *target, const struct user_regset *regset, in tm_cfpr_get() argument
237 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_get()
240 flush_tmregs_to_thread(target); in tm_cfpr_get()
241 flush_fp_to_thread(target); in tm_cfpr_get()
242 flush_altivec_to_thread(target); in tm_cfpr_get()
246 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_get()
247 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_get()
253 * @target: The target task.
272 int tm_cfpr_set(struct task_struct *target, const struct user_regset *regset, in tm_cfpr_set() argument
282 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_set()
285 flush_tmregs_to_thread(target); in tm_cfpr_set()
286 flush_fp_to_thread(target); in tm_cfpr_set()
287 flush_altivec_to_thread(target); in tm_cfpr_set()
290 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_set()
291 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_set()
298 target->thread.TS_CKFPR(i) = buf[i]; in tm_cfpr_set()
299 target->thread.ckfp_state.fpscr = buf[32]; in tm_cfpr_set()
305 * @target: The target task.
311 int tm_cvmx_active(struct task_struct *target, const struct user_regset *regset) in tm_cvmx_active() argument
316 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_active()
324 * @target: The target task.
341 int tm_cvmx_get(struct task_struct *target, const struct user_regset *regset, in tm_cvmx_get() argument
353 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_get()
357 flush_tmregs_to_thread(target); in tm_cvmx_get()
358 flush_fp_to_thread(target); in tm_cvmx_get()
359 flush_altivec_to_thread(target); in tm_cvmx_get()
361 membuf_write(&to, &target->thread.ckvr_state, 33 * sizeof(vector128)); in tm_cvmx_get()
366 vrsave.word = target->thread.ckvrsave; in tm_cvmx_get()
372 * @target: The target task.
392 int tm_cvmx_set(struct task_struct *target, const struct user_regset *regset, in tm_cvmx_set() argument
403 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_set()
406 flush_tmregs_to_thread(target); in tm_cvmx_set()
407 flush_fp_to_thread(target); in tm_cvmx_set()
408 flush_altivec_to_thread(target); in tm_cvmx_set()
410 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.ckvr_state, in tm_cvmx_set()
421 vrsave.word = target->thread.ckvrsave; in tm_cvmx_set()
425 target->thread.ckvrsave = vrsave.word; in tm_cvmx_set()
433 * @target: The target task.
439 int tm_cvsx_active(struct task_struct *target, const struct user_regset *regset) in tm_cvsx_active() argument
444 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_active()
447 flush_vsx_to_thread(target); in tm_cvsx_active()
448 return target->thread.used_vsr ? regset->n : 0; in tm_cvsx_active()
453 * @target: The target task.
468 int tm_cvsx_get(struct task_struct *target, const struct user_regset *regset, in tm_cvsx_get() argument
477 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_get()
481 flush_tmregs_to_thread(target); in tm_cvsx_get()
482 flush_fp_to_thread(target); in tm_cvsx_get()
483 flush_altivec_to_thread(target); in tm_cvsx_get()
484 flush_vsx_to_thread(target); in tm_cvsx_get()
487 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_get()
493 * @target: The target task.
511 int tm_cvsx_set(struct task_struct *target, const struct user_regset *regset, in tm_cvsx_set() argument
521 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_set()
525 flush_tmregs_to_thread(target); in tm_cvsx_set()
526 flush_fp_to_thread(target); in tm_cvsx_set()
527 flush_altivec_to_thread(target); in tm_cvsx_set()
528 flush_vsx_to_thread(target); in tm_cvsx_set()
531 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_set()
537 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in tm_cvsx_set()
544 * @target: The target task.
550 int tm_spr_active(struct task_struct *target, const struct user_regset *regset) in tm_spr_active() argument
560 * @target: The target task.
573 int tm_spr_get(struct task_struct *target, const struct user_regset *regset, in tm_spr_get() argument
585 flush_tmregs_to_thread(target); in tm_spr_get()
586 flush_fp_to_thread(target); in tm_spr_get()
587 flush_altivec_to_thread(target); in tm_spr_get()
590 membuf_write(&to, &target->thread.tm_tfhar, sizeof(u64)); in tm_spr_get()
592 membuf_write(&to, &target->thread.tm_texasr, sizeof(u64)); in tm_spr_get()
594 return membuf_write(&to, &target->thread.tm_tfiar, sizeof(u64)); in tm_spr_get()
599 * @target: The target task.
615 int tm_spr_set(struct task_struct *target, const struct user_regset *regset, in tm_spr_set() argument
630 flush_tmregs_to_thread(target); in tm_spr_set()
631 flush_fp_to_thread(target); in tm_spr_set()
632 flush_altivec_to_thread(target); in tm_spr_set()
636 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_set()
641 &target->thread.tm_texasr, sizeof(u64), in tm_spr_set()
647 &target->thread.tm_tfiar, in tm_spr_set()
652 int tm_tar_active(struct task_struct *target, const struct user_regset *regset) in tm_tar_active() argument
657 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_active()
663 int tm_tar_get(struct task_struct *target, const struct user_regset *regset, in tm_tar_get() argument
669 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_get()
672 return membuf_write(&to, &target->thread.tm_tar, sizeof(u64)); in tm_tar_get()
675 int tm_tar_set(struct task_struct *target, const struct user_regset *regset, in tm_tar_set() argument
684 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_set()
688 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_set()
692 int tm_ppr_active(struct task_struct *target, const struct user_regset *regset) in tm_ppr_active() argument
697 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_active()
704 int tm_ppr_get(struct task_struct *target, const struct user_regset *regset, in tm_ppr_get() argument
710 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_get()
713 return membuf_write(&to, &target->thread.tm_ppr, sizeof(u64)); in tm_ppr_get()
716 int tm_ppr_set(struct task_struct *target, const struct user_regset *regset, in tm_ppr_set() argument
725 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_set()
729 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_set()
733 int tm_dscr_active(struct task_struct *target, const struct user_regset *regset) in tm_dscr_active() argument
738 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_active()
744 int tm_dscr_get(struct task_struct *target, const struct user_regset *regset, in tm_dscr_get() argument
750 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_get()
753 return membuf_write(&to, &target->thread.tm_dscr, sizeof(u64)); in tm_dscr_get()
756 int tm_dscr_set(struct task_struct *target, const struct user_regset *regset, in tm_dscr_set() argument
765 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_set()
769 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_set()
773 int tm_cgpr32_get(struct task_struct *target, const struct user_regset *regset, in tm_cgpr32_get() argument
776 gpr32_get_common(target, regset, to, in tm_cgpr32_get()
777 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_get()
781 int tm_cgpr32_set(struct task_struct *target, const struct user_regset *regset, in tm_cgpr32_set() argument
785 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in tm_cgpr32_set()
786 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_set()