Lines Matching refs:target

218 static int gpr_get(struct task_struct *target, const struct user_regset *regset,  in gpr_get()  argument
225 if (target->thread.regs == NULL) in gpr_get()
228 membuf_write(&to, target->thread.regs, sizeof(struct user_pt_regs)); in gpr_get()
230 membuf_store(&to_msr, get_user_msr(target)); in gpr_get()
238 static int gpr_set(struct task_struct *target, const struct user_regset *regset, in gpr_set() argument
245 if (target->thread.regs == NULL) in gpr_set()
249 target->thread.regs, in gpr_set()
257 ret = set_user_msr(target, reg); in gpr_set()
265 &target->thread.regs->orig_gpr3, in gpr_set()
279 ret = set_user_trap(target, reg); in gpr_set()
290 static int ppr_get(struct task_struct *target, const struct user_regset *regset, in ppr_get() argument
293 if (!target->thread.regs) in ppr_get()
296 return membuf_write(&to, &target->thread.regs->ppr, sizeof(u64)); in ppr_get()
299 static int ppr_set(struct task_struct *target, const struct user_regset *regset, in ppr_set() argument
303 if (!target->thread.regs) in ppr_set()
307 &target->thread.regs->ppr, 0, sizeof(u64)); in ppr_set()
310 static int dscr_get(struct task_struct *target, const struct user_regset *regset, in dscr_get() argument
313 return membuf_write(&to, &target->thread.dscr, sizeof(u64)); in dscr_get()
315 static int dscr_set(struct task_struct *target, const struct user_regset *regset, in dscr_set() argument
320 &target->thread.dscr, 0, sizeof(u64)); in dscr_set()
324 static int tar_get(struct task_struct *target, const struct user_regset *regset, in tar_get() argument
327 return membuf_write(&to, &target->thread.tar, sizeof(u64)); in tar_get()
329 static int tar_set(struct task_struct *target, const struct user_regset *regset, in tar_set() argument
334 &target->thread.tar, 0, sizeof(u64)); in tar_set()
337 static int ebb_active(struct task_struct *target, const struct user_regset *regset) in ebb_active() argument
342 if (target->thread.used_ebb) in ebb_active()
348 static int ebb_get(struct task_struct *target, const struct user_regset *regset, in ebb_get() argument
358 if (!target->thread.used_ebb) in ebb_get()
361 return membuf_write(&to, &target->thread.ebbrr, 3 * sizeof(unsigned long)); in ebb_get()
364 static int ebb_set(struct task_struct *target, const struct user_regset *regset, in ebb_set() argument
377 if (target->thread.used_ebb) in ebb_set()
380 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.ebbrr, in ebb_set()
385 &target->thread.ebbhr, sizeof(unsigned long), in ebb_set()
390 &target->thread.bescr, 2 * sizeof(unsigned long), in ebb_set()
395 static int pmu_active(struct task_struct *target, const struct user_regset *regset) in pmu_active() argument
403 static int pmu_get(struct task_struct *target, const struct user_regset *regset, in pmu_get() argument
415 return membuf_write(&to, &target->thread.siar, 5 * sizeof(unsigned long)); in pmu_get()
418 static int pmu_set(struct task_struct *target, const struct user_regset *regset, in pmu_set() argument
433 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.siar, in pmu_set()
438 &target->thread.sdar, sizeof(unsigned long), in pmu_set()
443 &target->thread.sier, 2 * sizeof(unsigned long), in pmu_set()
448 &target->thread.mmcr2, 3 * sizeof(unsigned long), in pmu_set()
453 &target->thread.mmcr0, 4 * sizeof(unsigned long), in pmu_set()
458 static int dexcr_active(struct task_struct *target, const struct user_regset *regset) in dexcr_active() argument
466 static int dexcr_get(struct task_struct *target, const struct user_regset *regset, in dexcr_get() argument
472 membuf_store(&to, (u64)lower_32_bits(target->thread.dexcr)); in dexcr_get()
482 static int hashkeyr_active(struct task_struct *target, const struct user_regset *regset) in hashkeyr_active() argument
490 static int hashkeyr_get(struct task_struct *target, const struct user_regset *regset, in hashkeyr_get() argument
496 return membuf_store(&to, target->thread.hashkeyr); in hashkeyr_get()
499 static int hashkeyr_set(struct task_struct *target, const struct user_regset *regset, in hashkeyr_set() argument
506 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.hashkeyr, in hashkeyr_set()
513 static int pkey_active(struct task_struct *target, const struct user_regset *regset) in pkey_active() argument
521 static int pkey_get(struct task_struct *target, const struct user_regset *regset, in pkey_get() argument
528 membuf_store(&to, target->thread.regs->amr); in pkey_get()
529 membuf_store(&to, target->thread.regs->iamr); in pkey_get()
533 static int pkey_set(struct task_struct *target, const struct user_regset *regset, in pkey_set() argument
562 target->thread.regs->amr = (new_amr & default_uamor) | in pkey_set()
563 (target->thread.regs->amr & ~default_uamor); in pkey_set()
700 int gpr32_get_common(struct task_struct *target, in gpr32_get_common() argument
708 membuf_store(&to, (u32)get_user_msr(target)); in gpr32_get_common()
714 static int gpr32_set_common_kernel(struct task_struct *target, in gpr32_set_common_kernel() argument
728 set_user_msr(target, *k++); in gpr32_set_common_kernel()
739 set_user_trap(target, *k++); in gpr32_set_common_kernel()
752 static int gpr32_set_common_user(struct task_struct *target, in gpr32_set_common_user() argument
774 set_user_msr(target, reg); in gpr32_set_common_user()
788 set_user_trap(target, reg); in gpr32_set_common_user()
806 int gpr32_set_common(struct task_struct *target, in gpr32_set_common() argument
813 return gpr32_set_common_kernel(target, regset, pos, count, kbuf, regs); in gpr32_set_common()
815 return gpr32_set_common_user(target, regset, pos, count, ubuf, regs); in gpr32_set_common()
818 static int gpr32_get(struct task_struct *target, in gpr32_get() argument
822 if (target->thread.regs == NULL) in gpr32_get()
825 return gpr32_get_common(target, regset, to, in gpr32_get()
826 &target->thread.regs->gpr[0]); in gpr32_get()
829 static int gpr32_set(struct task_struct *target, in gpr32_set() argument
834 if (target->thread.regs == NULL) in gpr32_set()
837 return gpr32_set_common(target, regset, pos, count, kbuf, ubuf, in gpr32_set()
838 &target->thread.regs->gpr[0]); in gpr32_set()