Lines Matching full:current

86 	 * If we are saving the current thread's registers, and the  in check_if_tm_restore_required()
91 if (tsk == current && tsk->thread.regs && in check_if_tm_restore_required()
191 * This should only ever be called for current or in flush_fp_to_thread()
197 BUG_ON(tsk != current); in flush_fp_to_thread()
213 if (current->thread.regs && (current->thread.regs->msr & MSR_FP)) { in enable_kernel_fp()
214 check_if_tm_restore_required(current); in enable_kernel_fp()
223 MSR_TM_ACTIVE(current->thread.regs->msr)) in enable_kernel_fp()
225 __giveup_fpu(current); in enable_kernel_fp()
264 if (current->thread.regs && (current->thread.regs->msr & MSR_VEC)) { in enable_kernel_altivec()
265 check_if_tm_restore_required(current); in enable_kernel_altivec()
274 MSR_TM_ACTIVE(current->thread.regs->msr)) in enable_kernel_altivec()
276 __giveup_altivec(current); in enable_kernel_altivec()
290 BUG_ON(tsk != current); in flush_altivec_to_thread()
334 if (current->thread.regs && in enable_kernel_vsx()
335 (current->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP))) { in enable_kernel_vsx()
336 check_if_tm_restore_required(current); in enable_kernel_vsx()
345 MSR_TM_ACTIVE(current->thread.regs->msr)) in enable_kernel_vsx()
347 __giveup_vsx(current); in enable_kernel_vsx()
357 BUG_ON(tsk != current); in flush_vsx_to_thread()
383 if (current->thread.regs && (current->thread.regs->msr & MSR_SPE)) { in enable_kernel_spe()
384 check_if_tm_restore_required(current); in enable_kernel_spe()
385 __giveup_spe(current); in enable_kernel_spe()
395 BUG_ON(tsk != current); in flush_spe_to_thread()
454 if (current->thread.load_fp) { in should_restore_fp()
455 current->thread.load_fp++; in should_restore_fp()
463 load_fp_state(&current->thread.fp_state); in do_restore_fp()
473 if (cpu_has_feature(CPU_FTR_ALTIVEC) && (current->thread.load_vec)) { in should_restore_altivec()
474 current->thread.load_vec++; in should_restore_altivec()
482 load_vr_state(&current->thread.vr_state); in do_restore_altivec()
483 current->thread.used_vr = 1; in do_restore_altivec()
499 current->thread.used_vsr = 1; in do_restore_vsx()
547 fpexc_mode = current->thread.fpexc_mode; in restore_math()
595 BUG_ON(tsk != current); in flush_all_to_thread()
611 current->thread.trap_nr = TRAP_HWBKPT; in do_send_trap()
638 current->thread.hw_brk[0] = null_brk; in do_break_handler()
639 current->thread.hw_brk[0].flags |= HW_BRK_FLAG_DISABLED; in do_break_handler()
647 info = &current->thread.hw_brk[i]; in do_break_handler()
653 current->thread.hw_brk[i] = null_brk; in do_break_handler()
654 current->thread.hw_brk[i].flags |= HW_BRK_FLAG_DISABLED; in do_break_handler()
661 current->thread.trap_nr = TRAP_HWBKPT; in DEFINE_INTERRUPT_HANDLER()
751 if ((current->thread.debug.dbcr0 & DBCR0_IDM) in switch_booke_debug_regs()
934 * Use the current MSR TM suspended bit to track if we have in tm_reclaim_thread()
944 * We do this using the current MSR, rather tracking it in in tm_reclaim_thread()
978 tm_reclaim_thread(&current->thread, cause); in tm_reclaim_current()
1133 msr_diff = current->thread.ckpt_regs.msr & ~regs->msr; in restore_tm_state()
1138 current->thread.load_fp = 1; in restore_tm_state()
1141 current->thread.load_vec = 1; in restore_tm_state()
1197 if (!current->thread.regs) in kvmppc_save_user_regs()
1200 usermsr = current->thread.regs->msr; in kvmppc_save_user_regs()
1204 __giveup_fpu(current); in kvmppc_save_user_regs()
1206 __giveup_altivec(current); in kvmppc_save_user_regs()
1210 current->thread.tm_tfhar = mfspr(SPRN_TFHAR); in kvmppc_save_user_regs()
1211 current->thread.tm_tfiar = mfspr(SPRN_TFIAR); in kvmppc_save_user_regs()
1212 current->thread.tm_texasr = mfspr(SPRN_TEXASR); in kvmppc_save_user_regs()
1213 current->thread.regs->msr &= ~MSR_TM; in kvmppc_save_user_regs()
1221 save_sprs(&current->thread); in kvmppc_save_current_sprs()
1289 old_thread = &current->thread; in __switch_to()
1391 if (current->thread.regs) in __switch_to()
1392 restore_math(current->thread.regs); in __switch_to()
1463 pr_info("%s[%d]: code: %s\n", current->comm, in show_user_instructions()
1464 current->pid, s.buffer); in show_user_instructions()
1608 show_stack(current, (unsigned long *) regs->gpr[1], KERN_DEFAULT); in show_regs()
1616 flush_ptrace_hw_breakpoint(current); in flush_thread()
1618 set_debug_reg_defaults(&current->thread); in flush_thread()
1633 if (!current->thread.regs) { in arch_setup_new_exec()
1634 struct pt_regs *regs = task_stack_page(current) + THREAD_SIZE; in arch_setup_new_exec()
1635 current->thread.regs = regs - 1; in arch_setup_new_exec()
1639 current->thread.regs->amr = default_amr; in arch_setup_new_exec()
1640 current->thread.regs->iamr = default_iamr; in arch_setup_new_exec()
1645 current->thread.dexcr = current->thread.dexcr_onexec; in arch_setup_new_exec()
1646 mtspr(SPRN_DEXCR, current->thread.dexcr); in arch_setup_new_exec()
1654 * structure. For now, we only support setting TIDR for 'current' task.
1690 if (t != current) in set_thread_tidr()
1707 * copy the current task into the new thread.
1714 * flush but it removes the checkpointed state from the current CPU and in arch_dup_task_struct()
1884 p->thread.dscr_inherit = current->thread.dscr_inherit; in copy_thread()
1892 p->thread.hashkeyr = current->thread.hashkeyr; in copy_thread()
1985 current->thread.used_vsr = 0; in start_thread()
1987 current->thread.load_slb = 0; in start_thread()
1988 current->thread.load_fp = 0; in start_thread()
1990 memset(&current->thread.fp_state, 0, sizeof(current->thread.fp_state)); in start_thread()
1991 current->thread.fp_save_area = NULL; in start_thread()
1994 memset(&current->thread.vr_state, 0, sizeof(current->thread.vr_state)); in start_thread()
1995 current->thread.vr_state.vscr.u[3] = 0x00010000; /* Java mode disabled */ in start_thread()
1996 current->thread.vr_save_area = NULL; in start_thread()
1997 current->thread.vrsave = 0; in start_thread()
1998 current->thread.used_vr = 0; in start_thread()
1999 current->thread.load_vec = 0; in start_thread()
2002 memset(current->thread.evr, 0, sizeof(current->thread.evr)); in start_thread()
2003 current->thread.acc = 0; in start_thread()
2004 current->thread.spefscr = 0; in start_thread()
2005 current->thread.used_spe = 0; in start_thread()
2008 current->thread.tm_tfhar = 0; in start_thread()
2009 current->thread.tm_texasr = 0; in start_thread()
2010 current->thread.tm_tfiar = 0; in start_thread()
2011 current->thread.load_tm = 0; in start_thread()
2015 current->thread.hashkeyr = get_random_long(); in start_thread()
2016 mtspr(SPRN_HASHKEYR, current->thread.hashkeyr); in start_thread()
2321 tsk = current; in show_stack()
2328 if (tsk == current) in show_stack()
2346 ret_addr = ftrace_graph_ret_addr(current, in show_stack()
2358 * We look for the "regs" marker in the current frame. in show_stack()
2438 if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) in arch_align_stack()