Lines Matching refs:target
330 static int gpr_get(struct task_struct *target, const struct user_regset *regset, in gpr_get() argument
336 if (target->thread.regs == NULL) in gpr_get()
339 if (!FULL_REGS(target->thread.regs)) { in gpr_get()
342 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr_get()
346 target->thread.regs, in gpr_get()
349 unsigned long msr = get_user_msr(target); in gpr_get()
361 &target->thread.regs->orig_gpr3, in gpr_get()
371 static int gpr_set(struct task_struct *target, const struct user_regset *regset, in gpr_set() argument
378 if (target->thread.regs == NULL) in gpr_set()
381 CHECK_FULL_REGS(target->thread.regs); in gpr_set()
384 target->thread.regs, in gpr_set()
392 ret = set_user_msr(target, reg); in gpr_set()
400 &target->thread.regs->orig_gpr3, in gpr_set()
415 ret = set_user_trap(target, reg); in gpr_set()
438 static int fpr_get(struct task_struct *target, const struct user_regset *regset, in fpr_get() argument
446 flush_fp_to_thread(target); in fpr_get()
450 buf[i] = target->thread.TS_FPR(i); in fpr_get()
451 buf[32] = target->thread.fp_state.fpscr; in fpr_get()
457 flush_fp_to_thread(target); in fpr_get()
460 &target->thread.fp_state, 0, -1); in fpr_get()
477 static int fpr_set(struct task_struct *target, const struct user_regset *regset, in fpr_set() argument
485 flush_fp_to_thread(target); in fpr_set()
488 buf[i] = target->thread.TS_FPR(i); in fpr_set()
489 buf[32] = target->thread.fp_state.fpscr; in fpr_set()
497 target->thread.TS_FPR(i) = buf[i]; in fpr_set()
498 target->thread.fp_state.fpscr = buf[32]; in fpr_set()
504 flush_fp_to_thread(target); in fpr_set()
507 &target->thread.fp_state, 0, -1); in fpr_set()
525 static int vr_active(struct task_struct *target, in vr_active() argument
528 flush_altivec_to_thread(target); in vr_active()
529 return target->thread.used_vr ? regset->n : 0; in vr_active()
546 static int vr_get(struct task_struct *target, const struct user_regset *regset, in vr_get() argument
552 flush_altivec_to_thread(target); in vr_get()
558 &target->thread.vr_state, 0, in vr_get()
570 vrsave.word = target->thread.vrsave; in vr_get()
593 static int vr_set(struct task_struct *target, const struct user_regset *regset, in vr_set() argument
599 flush_altivec_to_thread(target); in vr_set()
605 &target->thread.vr_state, 0, in vr_set()
617 vrsave.word = target->thread.vrsave; in vr_set()
622 target->thread.vrsave = vrsave.word; in vr_set()
636 static int vsr_active(struct task_struct *target, in vsr_active() argument
639 flush_vsx_to_thread(target); in vsr_active()
640 return target->thread.used_vsr ? regset->n : 0; in vsr_active()
655 static int vsr_get(struct task_struct *target, const struct user_regset *regset, in vsr_get() argument
662 flush_tmregs_to_thread(target); in vsr_get()
663 flush_fp_to_thread(target); in vsr_get()
664 flush_altivec_to_thread(target); in vsr_get()
665 flush_vsx_to_thread(target); in vsr_get()
668 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_get()
688 static int vsr_set(struct task_struct *target, const struct user_regset *regset, in vsr_set() argument
695 flush_tmregs_to_thread(target); in vsr_set()
696 flush_fp_to_thread(target); in vsr_set()
697 flush_altivec_to_thread(target); in vsr_set()
698 flush_vsx_to_thread(target); in vsr_set()
701 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_set()
707 target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in vsr_set()
725 static int evr_active(struct task_struct *target, in evr_active() argument
728 flush_spe_to_thread(target); in evr_active()
729 return target->thread.used_spe ? regset->n : 0; in evr_active()
732 static int evr_get(struct task_struct *target, const struct user_regset *regset, in evr_get() argument
738 flush_spe_to_thread(target); in evr_get()
741 &target->thread.evr, in evr_get()
742 0, sizeof(target->thread.evr)); in evr_get()
749 &target->thread.acc, in evr_get()
750 sizeof(target->thread.evr), -1); in evr_get()
755 static int evr_set(struct task_struct *target, const struct user_regset *regset, in evr_set() argument
761 flush_spe_to_thread(target); in evr_set()
764 &target->thread.evr, in evr_set()
765 0, sizeof(target->thread.evr)); in evr_set()
772 &target->thread.acc, in evr_set()
773 sizeof(target->thread.evr), -1); in evr_set()
788 static int tm_cgpr_active(struct task_struct *target, in tm_cgpr_active() argument
794 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_active()
820 static int tm_cgpr_get(struct task_struct *target, in tm_cgpr_get() argument
830 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_get()
833 flush_tmregs_to_thread(target); in tm_cgpr_get()
834 flush_fp_to_thread(target); in tm_cgpr_get()
835 flush_altivec_to_thread(target); in tm_cgpr_get()
838 &target->thread.ckpt_regs, in tm_cgpr_get()
841 unsigned long msr = get_user_ckpt_msr(target); in tm_cgpr_get()
854 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_get()
884 static int tm_cgpr_set(struct task_struct *target, in tm_cgpr_set() argument
895 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_set()
898 flush_tmregs_to_thread(target); in tm_cgpr_set()
899 flush_fp_to_thread(target); in tm_cgpr_set()
900 flush_altivec_to_thread(target); in tm_cgpr_set()
903 &target->thread.ckpt_regs, in tm_cgpr_set()
911 ret = set_user_ckpt_msr(target, reg); in tm_cgpr_set()
919 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_set()
934 ret = set_user_ckpt_trap(target, reg); in tm_cgpr_set()
953 static int tm_cfpr_active(struct task_struct *target, in tm_cfpr_active() argument
959 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_active()
986 static int tm_cfpr_get(struct task_struct *target, in tm_cfpr_get() argument
997 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_get()
1000 flush_tmregs_to_thread(target); in tm_cfpr_get()
1001 flush_fp_to_thread(target); in tm_cfpr_get()
1002 flush_altivec_to_thread(target); in tm_cfpr_get()
1006 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_get()
1007 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_get()
1032 static int tm_cfpr_set(struct task_struct *target, in tm_cfpr_set() argument
1043 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_set()
1046 flush_tmregs_to_thread(target); in tm_cfpr_set()
1047 flush_fp_to_thread(target); in tm_cfpr_set()
1048 flush_altivec_to_thread(target); in tm_cfpr_set()
1051 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_set()
1052 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_set()
1059 target->thread.TS_CKFPR(i) = buf[i]; in tm_cfpr_set()
1060 target->thread.ckfp_state.fpscr = buf[32]; in tm_cfpr_set()
1072 static int tm_cvmx_active(struct task_struct *target, in tm_cvmx_active() argument
1078 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_active()
1106 static int tm_cvmx_get(struct task_struct *target, in tm_cvmx_get() argument
1118 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_get()
1122 flush_tmregs_to_thread(target); in tm_cvmx_get()
1123 flush_fp_to_thread(target); in tm_cvmx_get()
1124 flush_altivec_to_thread(target); in tm_cvmx_get()
1127 &target->thread.ckvr_state, 0, in tm_cvmx_get()
1138 vrsave.word = target->thread.ckvrsave; in tm_cvmx_get()
1168 static int tm_cvmx_set(struct task_struct *target, in tm_cvmx_set() argument
1180 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_set()
1183 flush_tmregs_to_thread(target); in tm_cvmx_set()
1184 flush_fp_to_thread(target); in tm_cvmx_set()
1185 flush_altivec_to_thread(target); in tm_cvmx_set()
1188 &target->thread.ckvr_state, 0, in tm_cvmx_set()
1199 vrsave.word = target->thread.ckvrsave; in tm_cvmx_set()
1203 target->thread.ckvrsave = vrsave.word; in tm_cvmx_set()
1217 static int tm_cvsx_active(struct task_struct *target, in tm_cvsx_active() argument
1223 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_active()
1226 flush_vsx_to_thread(target); in tm_cvsx_active()
1227 return target->thread.used_vsr ? regset->n : 0; in tm_cvsx_active()
1250 static int tm_cvsx_get(struct task_struct *target, in tm_cvsx_get() argument
1261 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_get()
1265 flush_tmregs_to_thread(target); in tm_cvsx_get()
1266 flush_fp_to_thread(target); in tm_cvsx_get()
1267 flush_altivec_to_thread(target); in tm_cvsx_get()
1268 flush_vsx_to_thread(target); in tm_cvsx_get()
1271 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_get()
1298 static int tm_cvsx_set(struct task_struct *target, in tm_cvsx_set() argument
1309 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_set()
1313 flush_tmregs_to_thread(target); in tm_cvsx_set()
1314 flush_fp_to_thread(target); in tm_cvsx_set()
1315 flush_altivec_to_thread(target); in tm_cvsx_set()
1316 flush_vsx_to_thread(target); in tm_cvsx_set()
1319 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_set()
1325 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in tm_cvsx_set()
1338 static int tm_spr_active(struct task_struct *target, in tm_spr_active() argument
1365 static int tm_spr_get(struct task_struct *target, in tm_spr_get() argument
1381 flush_tmregs_to_thread(target); in tm_spr_get()
1382 flush_fp_to_thread(target); in tm_spr_get()
1383 flush_altivec_to_thread(target); in tm_spr_get()
1387 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_get()
1392 &target->thread.tm_texasr, sizeof(u64), in tm_spr_get()
1398 &target->thread.tm_tfiar, in tm_spr_get()
1421 static int tm_spr_set(struct task_struct *target, in tm_spr_set() argument
1437 flush_tmregs_to_thread(target); in tm_spr_set()
1438 flush_fp_to_thread(target); in tm_spr_set()
1439 flush_altivec_to_thread(target); in tm_spr_set()
1443 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_set()
1448 &target->thread.tm_texasr, sizeof(u64), in tm_spr_set()
1454 &target->thread.tm_tfiar, in tm_spr_set()
1459 static int tm_tar_active(struct task_struct *target, in tm_tar_active() argument
1465 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_active()
1471 static int tm_tar_get(struct task_struct *target, in tm_tar_get() argument
1481 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_get()
1485 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_get()
1489 static int tm_tar_set(struct task_struct *target, in tm_tar_set() argument
1499 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_set()
1503 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_set()
1507 static int tm_ppr_active(struct task_struct *target, in tm_ppr_active() argument
1513 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_active()
1520 static int tm_ppr_get(struct task_struct *target, in tm_ppr_get() argument
1530 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_get()
1534 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_get()
1538 static int tm_ppr_set(struct task_struct *target, in tm_ppr_set() argument
1548 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_set()
1552 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_set()
1556 static int tm_dscr_active(struct task_struct *target, in tm_dscr_active() argument
1562 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_active()
1568 static int tm_dscr_get(struct task_struct *target, in tm_dscr_get() argument
1578 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_get()
1582 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_get()
1586 static int tm_dscr_set(struct task_struct *target, in tm_dscr_set() argument
1596 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_set()
1600 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_set()
1606 static int ppr_get(struct task_struct *target, in ppr_get() argument
1612 &target->thread.ppr, 0, sizeof(u64)); in ppr_get()
1615 static int ppr_set(struct task_struct *target, in ppr_set() argument
1621 &target->thread.ppr, 0, sizeof(u64)); in ppr_set()
1624 static int dscr_get(struct task_struct *target, in dscr_get() argument
1630 &target->thread.dscr, 0, sizeof(u64)); in dscr_get()
1632 static int dscr_set(struct task_struct *target, in dscr_set() argument
1638 &target->thread.dscr, 0, sizeof(u64)); in dscr_set()
1642 static int tar_get(struct task_struct *target, in tar_get() argument
1648 &target->thread.tar, 0, sizeof(u64)); in tar_get()
1650 static int tar_set(struct task_struct *target, in tar_set() argument
1656 &target->thread.tar, 0, sizeof(u64)); in tar_set()
1659 static int ebb_active(struct task_struct *target, in ebb_active() argument
1665 if (target->thread.used_ebb) in ebb_active()
1671 static int ebb_get(struct task_struct *target, in ebb_get() argument
1683 if (!target->thread.used_ebb) in ebb_get()
1687 &target->thread.ebbrr, 0, 3 * sizeof(unsigned long)); in ebb_get()
1690 static int ebb_set(struct task_struct *target, in ebb_set() argument
1704 if (target->thread.used_ebb) in ebb_set()
1708 &target->thread.ebbrr, 0, sizeof(unsigned long)); in ebb_set()
1712 &target->thread.ebbhr, sizeof(unsigned long), in ebb_set()
1717 &target->thread.bescr, in ebb_set()
1722 static int pmu_active(struct task_struct *target, in pmu_active() argument
1731 static int pmu_get(struct task_struct *target, in pmu_get() argument
1746 &target->thread.siar, 0, in pmu_get()
1750 static int pmu_set(struct task_struct *target, in pmu_set() argument
1767 &target->thread.siar, 0, in pmu_set()
1772 &target->thread.sdar, sizeof(unsigned long), in pmu_set()
1777 &target->thread.sier, 2 * sizeof(unsigned long), in pmu_set()
1782 &target->thread.mmcr2, 3 * sizeof(unsigned long), in pmu_set()
1787 &target->thread.mmcr0, 4 * sizeof(unsigned long), in pmu_set()
1794 static int pkey_active(struct task_struct *target, in pkey_active() argument
1803 static int pkey_get(struct task_struct *target, in pkey_get() argument
1815 &target->thread.amr, 0, in pkey_get()
1819 static int pkey_set(struct task_struct *target, in pkey_set() argument
1840 target->thread.amr = (new_amr & target->thread.uamor) | in pkey_set()
1841 (target->thread.amr & ~target->thread.uamor); in pkey_set()
2006 static int gpr32_get_common(struct task_struct *target, in gpr32_get_common() argument
2028 reg = get_user_msr(target); in gpr32_get_common()
2053 static int gpr32_set_common(struct task_struct *target, in gpr32_set_common() argument
2082 set_user_msr(target, reg); in gpr32_set_common()
2108 set_user_trap(target, reg); in gpr32_set_common()
2122 static int tm_cgpr32_get(struct task_struct *target, in tm_cgpr32_get() argument
2127 return gpr32_get_common(target, regset, pos, count, kbuf, ubuf, in tm_cgpr32_get()
2128 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_get()
2131 static int tm_cgpr32_set(struct task_struct *target, in tm_cgpr32_set() argument
2136 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in tm_cgpr32_set()
2137 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_set()
2141 static int gpr32_get(struct task_struct *target, in gpr32_get() argument
2148 if (target->thread.regs == NULL) in gpr32_get()
2151 if (!FULL_REGS(target->thread.regs)) { in gpr32_get()
2157 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr32_get()
2159 return gpr32_get_common(target, regset, pos, count, kbuf, ubuf, in gpr32_get()
2160 &target->thread.regs->gpr[0]); in gpr32_get()
2163 static int gpr32_set(struct task_struct *target, in gpr32_set() argument
2168 if (target->thread.regs == NULL) in gpr32_set()
2171 CHECK_FULL_REGS(target->thread.regs); in gpr32_set()
2172 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in gpr32_set()
2173 &target->thread.regs->gpr[0]); in gpr32_set()