Lines Matching full:target

45 static void init_fp_ctx(struct task_struct *target)  in init_fp_ctx()  argument
47 /* The target already has context */ in init_fp_ctx()
48 if (tsk_used_math(target)) in init_fp_ctx()
52 memset(&target->thread.fpu.fpr, ~0, sizeof(target->thread.fpu.fpr)); in init_fp_ctx()
53 set_stopped_child_used_math(target); in init_fp_ctx()
70 static int gpr_get(struct task_struct *target, in gpr_get() argument
75 struct pt_regs *regs = task_pt_regs(target); in gpr_get()
85 static int gpr_set(struct task_struct *target, in gpr_set() argument
94 struct pt_regs *regs = task_pt_regs(target); in gpr_set()
116 static int gfpr_get(struct task_struct *target, struct membuf *to) in gfpr_get() argument
118 return membuf_write(to, &target->thread.fpu.fpr, in gfpr_get()
122 static int gfpr_get_simd(struct task_struct *target, struct membuf *to) in gfpr_get_simd() argument
129 fpr_val = get_fpr64(&target->thread.fpu.fpr[i], 0); in gfpr_get_simd()
140 static int fpr_get(struct task_struct *target, in fpr_get() argument
146 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_get()
147 r = gfpr_get(target, &to); in fpr_get()
149 r = gfpr_get_simd(target, &to); in fpr_get()
151 r = membuf_write(&to, &target->thread.fpu.fcc, sizeof(target->thread.fpu.fcc)); in fpr_get()
152 r = membuf_write(&to, &target->thread.fpu.fcsr, sizeof(target->thread.fpu.fcsr)); in fpr_get()
157 static int gfpr_set(struct task_struct *target, in gfpr_set() argument
162 &target->thread.fpu.fpr, in gfpr_set()
166 static int gfpr_set_simd(struct task_struct *target, in gfpr_set_simd() argument
180 set_fpr64(&target->thread.fpu.fpr[i], 0, fpr_val); in gfpr_set_simd()
190 static int fpr_set(struct task_struct *target, in fpr_set() argument
203 init_fp_ctx(target); in fpr_set()
205 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_set()
206 err = gfpr_set(target, &pos, &count, &kbuf, &ubuf); in fpr_set()
208 err = gfpr_set_simd(target, &pos, &count, &kbuf, &ubuf); in fpr_set()
213 &target->thread.fpu.fcc, fcc_start, in fpr_set()
216 &target->thread.fpu.fcsr, fcsr_start, in fpr_set()
222 static int cfg_get(struct task_struct *target, in cfg_get() argument
241 static int cfg_set(struct task_struct *target, in cfg_set() argument
364 static inline int read_user(struct task_struct *target, unsigned long addr, in read_user() argument
371 tmp = task_pt_regs(target)->regs[addr]; in read_user()
374 tmp = task_pt_regs(target)->orig_a0; in read_user()
377 tmp = task_pt_regs(target)->csr_era; in read_user()
380 tmp = task_pt_regs(target)->csr_badvaddr; in read_user()
389 static inline int write_user(struct task_struct *target, unsigned long addr, in write_user() argument
394 task_pt_regs(target)->regs[addr] = data; in write_user()
397 task_pt_regs(target)->orig_a0 = data; in write_user()
400 task_pt_regs(target)->csr_era = data; in write_user()
403 task_pt_regs(target)->csr_badvaddr = data; in write_user()