Lines Matching refs:tsk
78 void giveup_fpu_maybe_transactional(struct task_struct *tsk) in giveup_fpu_maybe_transactional() argument
86 if (tsk == current && tsk->thread.regs && in giveup_fpu_maybe_transactional()
87 MSR_TM_ACTIVE(tsk->thread.regs->msr) && in giveup_fpu_maybe_transactional()
89 tsk->thread.ckpt_regs.msr = tsk->thread.regs->msr; in giveup_fpu_maybe_transactional()
93 giveup_fpu(tsk); in giveup_fpu_maybe_transactional()
96 void giveup_altivec_maybe_transactional(struct task_struct *tsk) in giveup_altivec_maybe_transactional() argument
104 if (tsk == current && tsk->thread.regs && in giveup_altivec_maybe_transactional()
105 MSR_TM_ACTIVE(tsk->thread.regs->msr) && in giveup_altivec_maybe_transactional()
107 tsk->thread.ckpt_regs.msr = tsk->thread.regs->msr; in giveup_altivec_maybe_transactional()
111 giveup_altivec(tsk); in giveup_altivec_maybe_transactional()
115 #define giveup_fpu_maybe_transactional(tsk) giveup_fpu(tsk) argument
116 #define giveup_altivec_maybe_transactional(tsk) giveup_altivec(tsk) argument
124 void flush_fp_to_thread(struct task_struct *tsk) in flush_fp_to_thread() argument
126 if (tsk->thread.regs) { in flush_fp_to_thread()
136 if (tsk->thread.regs->msr & MSR_FP) { in flush_fp_to_thread()
145 BUG_ON(tsk != current); in flush_fp_to_thread()
147 giveup_fpu_maybe_transactional(tsk); in flush_fp_to_thread()
190 void flush_altivec_to_thread(struct task_struct *tsk) in flush_altivec_to_thread() argument
192 if (tsk->thread.regs) { in flush_altivec_to_thread()
194 if (tsk->thread.regs->msr & MSR_VEC) { in flush_altivec_to_thread()
196 BUG_ON(tsk != current); in flush_altivec_to_thread()
198 giveup_altivec_maybe_transactional(tsk); in flush_altivec_to_thread()
222 void giveup_vsx(struct task_struct *tsk) in giveup_vsx() argument
224 giveup_fpu_maybe_transactional(tsk); in giveup_vsx()
225 giveup_altivec_maybe_transactional(tsk); in giveup_vsx()
226 __giveup_vsx(tsk); in giveup_vsx()
230 void flush_vsx_to_thread(struct task_struct *tsk) in flush_vsx_to_thread() argument
232 if (tsk->thread.regs) { in flush_vsx_to_thread()
234 if (tsk->thread.regs->msr & MSR_VSX) { in flush_vsx_to_thread()
236 BUG_ON(tsk != current); in flush_vsx_to_thread()
238 giveup_vsx(tsk); in flush_vsx_to_thread()
263 void flush_spe_to_thread(struct task_struct *tsk) in flush_spe_to_thread() argument
265 if (tsk->thread.regs) { in flush_spe_to_thread()
267 if (tsk->thread.regs->msr & MSR_SPE) { in flush_spe_to_thread()
269 BUG_ON(tsk != current); in flush_spe_to_thread()
271 tsk->thread.spefscr = mfspr(SPRN_SPEFSCR); in flush_spe_to_thread()
272 giveup_spe(tsk); in flush_spe_to_thread()
589 static inline void tm_reclaim_task(struct task_struct *tsk) in tm_reclaim_task() argument
601 struct thread_struct *thr = &tsk->thread; in tm_reclaim_task()
614 if (!test_ti_thread_flag(task_thread_info(tsk), TIF_RESTORE_TM)) in tm_reclaim_task()
619 tsk->pid, thr->regs->nip, in tm_reclaim_task()
623 tm_reclaim_thread(thr, task_thread_info(tsk), TM_CAUSE_RESCHED); in tm_reclaim_task()
626 tsk->pid); in tm_reclaim_task()
1340 int set_fpexc_mode(struct task_struct *tsk, unsigned int val) in set_fpexc_mode() argument
1342 struct pt_regs *regs = tsk->thread.regs; in set_fpexc_mode()
1363 tsk->thread.spefscr_last = mfspr(SPRN_SPEFSCR); in set_fpexc_mode()
1364 tsk->thread.fpexc_mode = val & in set_fpexc_mode()
1382 tsk->thread.fpexc_mode = __pack_fe01(val); in set_fpexc_mode()
1385 | tsk->thread.fpexc_mode; in set_fpexc_mode()
1389 int get_fpexc_mode(struct task_struct *tsk, unsigned long adr) in get_fpexc_mode() argument
1393 if (tsk->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) in get_fpexc_mode()
1408 tsk->thread.spefscr_last = mfspr(SPRN_SPEFSCR); in get_fpexc_mode()
1409 val = tsk->thread.fpexc_mode; in get_fpexc_mode()
1416 val = __unpack_fe01(tsk->thread.fpexc_mode); in get_fpexc_mode()
1420 int set_endian(struct task_struct *tsk, unsigned int val) in set_endian() argument
1422 struct pt_regs *regs = tsk->thread.regs; in set_endian()
1441 int get_endian(struct task_struct *tsk, unsigned long adr) in get_endian() argument
1443 struct pt_regs *regs = tsk->thread.regs; in get_endian()
1464 int set_unalign_ctl(struct task_struct *tsk, unsigned int val) in set_unalign_ctl() argument
1466 tsk->thread.align_ctl = val; in set_unalign_ctl()
1470 int get_unalign_ctl(struct task_struct *tsk, unsigned long adr) in get_unalign_ctl() argument
1472 return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr); in get_unalign_ctl()
1540 void show_stack(struct task_struct *tsk, unsigned long *stack) in show_stack() argument
1552 if (tsk == NULL) in show_stack()
1553 tsk = current; in show_stack()
1555 if (tsk == current) in show_stack()
1558 sp = tsk->thread.ksp; in show_stack()
1564 if (!validate_sp(sp, tsk, STACK_FRAME_OVERHEAD)) in show_stack()
1589 if (validate_sp(sp, tsk, STACK_INT_FRAME_SIZE) in show_stack()