Lines Matching refs:target
337 static int gpr_get(struct task_struct *target, const struct user_regset *regset, in gpr_get() argument
343 if (target->thread.regs == NULL) in gpr_get()
346 if (!FULL_REGS(target->thread.regs)) { in gpr_get()
349 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr_get()
353 target->thread.regs, in gpr_get()
356 unsigned long msr = get_user_msr(target); in gpr_get()
368 &target->thread.regs->orig_gpr3, in gpr_get()
378 static int gpr_set(struct task_struct *target, const struct user_regset *regset, in gpr_set() argument
385 if (target->thread.regs == NULL) in gpr_set()
388 CHECK_FULL_REGS(target->thread.regs); in gpr_set()
391 target->thread.regs, in gpr_set()
399 ret = set_user_msr(target, reg); in gpr_set()
407 &target->thread.regs->orig_gpr3, in gpr_set()
422 ret = set_user_trap(target, reg); in gpr_set()
445 static int fpr_get(struct task_struct *target, const struct user_regset *regset, in fpr_get() argument
453 flush_fp_to_thread(target); in fpr_get()
457 buf[i] = target->thread.TS_FPR(i); in fpr_get()
458 buf[32] = target->thread.fp_state.fpscr; in fpr_get()
464 flush_fp_to_thread(target); in fpr_get()
467 &target->thread.fp_state, 0, -1); in fpr_get()
484 static int fpr_set(struct task_struct *target, const struct user_regset *regset, in fpr_set() argument
492 flush_fp_to_thread(target); in fpr_set()
495 buf[i] = target->thread.TS_FPR(i); in fpr_set()
496 buf[32] = target->thread.fp_state.fpscr; in fpr_set()
504 target->thread.TS_FPR(i) = buf[i]; in fpr_set()
505 target->thread.fp_state.fpscr = buf[32]; in fpr_set()
511 flush_fp_to_thread(target); in fpr_set()
514 &target->thread.fp_state, 0, -1); in fpr_set()
532 static int vr_active(struct task_struct *target, in vr_active() argument
535 flush_altivec_to_thread(target); in vr_active()
536 return target->thread.used_vr ? regset->n : 0; in vr_active()
553 static int vr_get(struct task_struct *target, const struct user_regset *regset, in vr_get() argument
559 flush_altivec_to_thread(target); in vr_get()
565 &target->thread.vr_state, 0, in vr_get()
578 vrsave.word = target->thread.vrsave; in vr_get()
603 static int vr_set(struct task_struct *target, const struct user_regset *regset, in vr_set() argument
609 flush_altivec_to_thread(target); in vr_set()
615 &target->thread.vr_state, 0, in vr_set()
628 vrsave.word = target->thread.vrsave; in vr_set()
635 target->thread.vrsave = vrsave.word; in vr_set()
649 static int vsr_active(struct task_struct *target, in vsr_active() argument
652 flush_vsx_to_thread(target); in vsr_active()
653 return target->thread.used_vsr ? regset->n : 0; in vsr_active()
668 static int vsr_get(struct task_struct *target, const struct user_regset *regset, in vsr_get() argument
675 flush_tmregs_to_thread(target); in vsr_get()
676 flush_fp_to_thread(target); in vsr_get()
677 flush_altivec_to_thread(target); in vsr_get()
678 flush_vsx_to_thread(target); in vsr_get()
681 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_get()
701 static int vsr_set(struct task_struct *target, const struct user_regset *regset, in vsr_set() argument
708 flush_tmregs_to_thread(target); in vsr_set()
709 flush_fp_to_thread(target); in vsr_set()
710 flush_altivec_to_thread(target); in vsr_set()
711 flush_vsx_to_thread(target); in vsr_set()
714 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_set()
720 target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in vsr_set()
738 static int evr_active(struct task_struct *target, in evr_active() argument
741 flush_spe_to_thread(target); in evr_active()
742 return target->thread.used_spe ? regset->n : 0; in evr_active()
745 static int evr_get(struct task_struct *target, const struct user_regset *regset, in evr_get() argument
751 flush_spe_to_thread(target); in evr_get()
754 &target->thread.evr, in evr_get()
755 0, sizeof(target->thread.evr)); in evr_get()
762 &target->thread.acc, in evr_get()
763 sizeof(target->thread.evr), -1); in evr_get()
768 static int evr_set(struct task_struct *target, const struct user_regset *regset, in evr_set() argument
774 flush_spe_to_thread(target); in evr_set()
777 &target->thread.evr, in evr_set()
778 0, sizeof(target->thread.evr)); in evr_set()
785 &target->thread.acc, in evr_set()
786 sizeof(target->thread.evr), -1); in evr_set()
801 static int tm_cgpr_active(struct task_struct *target, in tm_cgpr_active() argument
807 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_active()
833 static int tm_cgpr_get(struct task_struct *target, in tm_cgpr_get() argument
843 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_get()
846 flush_tmregs_to_thread(target); in tm_cgpr_get()
847 flush_fp_to_thread(target); in tm_cgpr_get()
848 flush_altivec_to_thread(target); in tm_cgpr_get()
851 &target->thread.ckpt_regs, in tm_cgpr_get()
854 unsigned long msr = get_user_ckpt_msr(target); in tm_cgpr_get()
867 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_get()
897 static int tm_cgpr_set(struct task_struct *target, in tm_cgpr_set() argument
908 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_set()
911 flush_tmregs_to_thread(target); in tm_cgpr_set()
912 flush_fp_to_thread(target); in tm_cgpr_set()
913 flush_altivec_to_thread(target); in tm_cgpr_set()
916 &target->thread.ckpt_regs, in tm_cgpr_set()
924 ret = set_user_ckpt_msr(target, reg); in tm_cgpr_set()
932 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_set()
947 ret = set_user_ckpt_trap(target, reg); in tm_cgpr_set()
966 static int tm_cfpr_active(struct task_struct *target, in tm_cfpr_active() argument
972 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_active()
999 static int tm_cfpr_get(struct task_struct *target, in tm_cfpr_get() argument
1010 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_get()
1013 flush_tmregs_to_thread(target); in tm_cfpr_get()
1014 flush_fp_to_thread(target); in tm_cfpr_get()
1015 flush_altivec_to_thread(target); in tm_cfpr_get()
1019 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_get()
1020 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_get()
1045 static int tm_cfpr_set(struct task_struct *target, in tm_cfpr_set() argument
1056 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_set()
1059 flush_tmregs_to_thread(target); in tm_cfpr_set()
1060 flush_fp_to_thread(target); in tm_cfpr_set()
1061 flush_altivec_to_thread(target); in tm_cfpr_set()
1064 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_set()
1065 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_set()
1072 target->thread.TS_CKFPR(i) = buf[i]; in tm_cfpr_set()
1073 target->thread.ckfp_state.fpscr = buf[32]; in tm_cfpr_set()
1085 static int tm_cvmx_active(struct task_struct *target, in tm_cvmx_active() argument
1091 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_active()
1119 static int tm_cvmx_get(struct task_struct *target, in tm_cvmx_get() argument
1131 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_get()
1135 flush_tmregs_to_thread(target); in tm_cvmx_get()
1136 flush_fp_to_thread(target); in tm_cvmx_get()
1137 flush_altivec_to_thread(target); in tm_cvmx_get()
1140 &target->thread.ckvr_state, 0, in tm_cvmx_get()
1151 vrsave.word = target->thread.ckvrsave; in tm_cvmx_get()
1181 static int tm_cvmx_set(struct task_struct *target, in tm_cvmx_set() argument
1193 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_set()
1196 flush_tmregs_to_thread(target); in tm_cvmx_set()
1197 flush_fp_to_thread(target); in tm_cvmx_set()
1198 flush_altivec_to_thread(target); in tm_cvmx_set()
1201 &target->thread.ckvr_state, 0, in tm_cvmx_set()
1212 vrsave.word = target->thread.ckvrsave; in tm_cvmx_set()
1216 target->thread.ckvrsave = vrsave.word; in tm_cvmx_set()
1230 static int tm_cvsx_active(struct task_struct *target, in tm_cvsx_active() argument
1236 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_active()
1239 flush_vsx_to_thread(target); in tm_cvsx_active()
1240 return target->thread.used_vsr ? regset->n : 0; in tm_cvsx_active()
1263 static int tm_cvsx_get(struct task_struct *target, in tm_cvsx_get() argument
1274 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_get()
1278 flush_tmregs_to_thread(target); in tm_cvsx_get()
1279 flush_fp_to_thread(target); in tm_cvsx_get()
1280 flush_altivec_to_thread(target); in tm_cvsx_get()
1281 flush_vsx_to_thread(target); in tm_cvsx_get()
1284 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_get()
1311 static int tm_cvsx_set(struct task_struct *target, in tm_cvsx_set() argument
1322 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_set()
1326 flush_tmregs_to_thread(target); in tm_cvsx_set()
1327 flush_fp_to_thread(target); in tm_cvsx_set()
1328 flush_altivec_to_thread(target); in tm_cvsx_set()
1329 flush_vsx_to_thread(target); in tm_cvsx_set()
1332 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_set()
1338 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in tm_cvsx_set()
1351 static int tm_spr_active(struct task_struct *target, in tm_spr_active() argument
1378 static int tm_spr_get(struct task_struct *target, in tm_spr_get() argument
1394 flush_tmregs_to_thread(target); in tm_spr_get()
1395 flush_fp_to_thread(target); in tm_spr_get()
1396 flush_altivec_to_thread(target); in tm_spr_get()
1400 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_get()
1405 &target->thread.tm_texasr, sizeof(u64), in tm_spr_get()
1411 &target->thread.tm_tfiar, in tm_spr_get()
1434 static int tm_spr_set(struct task_struct *target, in tm_spr_set() argument
1450 flush_tmregs_to_thread(target); in tm_spr_set()
1451 flush_fp_to_thread(target); in tm_spr_set()
1452 flush_altivec_to_thread(target); in tm_spr_set()
1456 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_set()
1461 &target->thread.tm_texasr, sizeof(u64), in tm_spr_set()
1467 &target->thread.tm_tfiar, in tm_spr_set()
1472 static int tm_tar_active(struct task_struct *target, in tm_tar_active() argument
1478 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_active()
1484 static int tm_tar_get(struct task_struct *target, in tm_tar_get() argument
1494 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_get()
1498 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_get()
1502 static int tm_tar_set(struct task_struct *target, in tm_tar_set() argument
1512 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_set()
1516 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_set()
1520 static int tm_ppr_active(struct task_struct *target, in tm_ppr_active() argument
1526 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_active()
1533 static int tm_ppr_get(struct task_struct *target, in tm_ppr_get() argument
1543 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_get()
1547 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_get()
1551 static int tm_ppr_set(struct task_struct *target, in tm_ppr_set() argument
1561 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_set()
1565 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_set()
1569 static int tm_dscr_active(struct task_struct *target, in tm_dscr_active() argument
1575 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_active()
1581 static int tm_dscr_get(struct task_struct *target, in tm_dscr_get() argument
1591 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_get()
1595 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_get()
1599 static int tm_dscr_set(struct task_struct *target, in tm_dscr_set() argument
1609 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_set()
1613 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_set()
1619 static int ppr_get(struct task_struct *target, in ppr_get() argument
1625 &target->thread.regs->ppr, 0, sizeof(u64)); in ppr_get()
1628 static int ppr_set(struct task_struct *target, in ppr_set() argument
1634 &target->thread.regs->ppr, 0, sizeof(u64)); in ppr_set()
1637 static int dscr_get(struct task_struct *target, in dscr_get() argument
1643 &target->thread.dscr, 0, sizeof(u64)); in dscr_get()
1645 static int dscr_set(struct task_struct *target, in dscr_set() argument
1651 &target->thread.dscr, 0, sizeof(u64)); in dscr_set()
1655 static int tar_get(struct task_struct *target, in tar_get() argument
1661 &target->thread.tar, 0, sizeof(u64)); in tar_get()
1663 static int tar_set(struct task_struct *target, in tar_set() argument
1669 &target->thread.tar, 0, sizeof(u64)); in tar_set()
1672 static int ebb_active(struct task_struct *target, in ebb_active() argument
1678 if (target->thread.used_ebb) in ebb_active()
1684 static int ebb_get(struct task_struct *target, in ebb_get() argument
1696 if (!target->thread.used_ebb) in ebb_get()
1700 &target->thread.ebbrr, 0, 3 * sizeof(unsigned long)); in ebb_get()
1703 static int ebb_set(struct task_struct *target, in ebb_set() argument
1717 if (target->thread.used_ebb) in ebb_set()
1721 &target->thread.ebbrr, 0, sizeof(unsigned long)); in ebb_set()
1725 &target->thread.ebbhr, sizeof(unsigned long), in ebb_set()
1730 &target->thread.bescr, in ebb_set()
1735 static int pmu_active(struct task_struct *target, in pmu_active() argument
1744 static int pmu_get(struct task_struct *target, in pmu_get() argument
1759 &target->thread.siar, 0, in pmu_get()
1763 static int pmu_set(struct task_struct *target, in pmu_set() argument
1780 &target->thread.siar, 0, in pmu_set()
1785 &target->thread.sdar, sizeof(unsigned long), in pmu_set()
1790 &target->thread.sier, 2 * sizeof(unsigned long), in pmu_set()
1795 &target->thread.mmcr2, 3 * sizeof(unsigned long), in pmu_set()
1800 &target->thread.mmcr0, 4 * sizeof(unsigned long), in pmu_set()
1807 static int pkey_active(struct task_struct *target, in pkey_active() argument
1816 static int pkey_get(struct task_struct *target, in pkey_get() argument
1828 &target->thread.amr, 0, in pkey_get()
1832 static int pkey_set(struct task_struct *target, in pkey_set() argument
1853 target->thread.amr = (new_amr & target->thread.uamor) | in pkey_set()
1854 (target->thread.amr & ~target->thread.uamor); in pkey_set()
2019 static int gpr32_get_common(struct task_struct *target, in gpr32_get_common() argument
2041 reg = get_user_msr(target); in gpr32_get_common()
2066 static int gpr32_set_common(struct task_struct *target, in gpr32_set_common() argument
2095 set_user_msr(target, reg); in gpr32_set_common()
2121 set_user_trap(target, reg); in gpr32_set_common()
2135 static int tm_cgpr32_get(struct task_struct *target, in tm_cgpr32_get() argument
2140 return gpr32_get_common(target, regset, pos, count, kbuf, ubuf, in tm_cgpr32_get()
2141 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_get()
2144 static int tm_cgpr32_set(struct task_struct *target, in tm_cgpr32_set() argument
2149 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in tm_cgpr32_set()
2150 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_set()
2154 static int gpr32_get(struct task_struct *target, in gpr32_get() argument
2161 if (target->thread.regs == NULL) in gpr32_get()
2164 if (!FULL_REGS(target->thread.regs)) { in gpr32_get()
2170 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr32_get()
2172 return gpr32_get_common(target, regset, pos, count, kbuf, ubuf, in gpr32_get()
2173 &target->thread.regs->gpr[0]); in gpr32_get()
2176 static int gpr32_set(struct task_struct *target, in gpr32_set() argument
2181 if (target->thread.regs == NULL) in gpr32_set()
2184 CHECK_FULL_REGS(target->thread.regs); in gpr32_set()
2185 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in gpr32_set()
2186 &target->thread.regs->gpr[0]); in gpr32_set()