/arch/mn10300/include/asm/ |
D | fpu.h | 36 static inline void set_using_fpu(struct task_struct *tsk) in set_using_fpu() argument 41 : "i"(THREAD_USING_FPU), "a"(&tsk->thread.fpu_flags) in set_using_fpu() 45 static inline void clear_using_fpu(struct task_struct *tsk) in clear_using_fpu() argument 50 : "i"(THREAD_USING_FPU), "a"(&tsk->thread.fpu_flags) in clear_using_fpu() 54 #define is_using_fpu(tsk) ((tsk)->thread.fpu_flags & THREAD_USING_FPU) argument 63 static inline void unlazy_fpu(struct task_struct *tsk) in unlazy_fpu() argument 67 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in unlazy_fpu() 68 fpu_save(&tsk->thread.fpu_state); in unlazy_fpu() 69 tsk->thread.fpu_flags &= ~THREAD_HAS_FPU; in unlazy_fpu() 70 tsk->thread.uregs->epsw &= ~EPSW_FE; in unlazy_fpu() [all …]
|
/arch/mips/include/asm/ |
D | dsp.h | 43 #define __save_dsp(tsk) \ argument 45 tsk->thread.dsp.dspr[0] = mfhi1(); \ 46 tsk->thread.dsp.dspr[1] = mflo1(); \ 47 tsk->thread.dsp.dspr[2] = mfhi2(); \ 48 tsk->thread.dsp.dspr[3] = mflo2(); \ 49 tsk->thread.dsp.dspr[4] = mfhi3(); \ 50 tsk->thread.dsp.dspr[5] = mflo3(); \ 51 tsk->thread.dsp.dspcontrol = rddsp(DSP_MASK); \ 54 #define save_dsp(tsk) \ argument 57 __save_dsp(tsk); \ [all …]
|
D | fpu.h | 170 static inline void lose_fpu_inatomic(int save, struct task_struct *tsk) in lose_fpu_inatomic() argument 174 save_msa(tsk); in lose_fpu_inatomic() 175 tsk->thread.fpu.fcr31 = in lose_fpu_inatomic() 179 clear_tsk_thread_flag(tsk, TIF_USEDMSA); in lose_fpu_inatomic() 183 _save_fp(tsk); in lose_fpu_inatomic() 190 KSTK_STATUS(tsk) &= ~ST0_CU1; in lose_fpu_inatomic() 191 clear_tsk_thread_flag(tsk, TIF_USEDFPU); in lose_fpu_inatomic() 239 static inline void save_fp(struct task_struct *tsk) in save_fp() argument 242 _save_fp(tsk); in save_fp() 245 static inline void restore_fp(struct task_struct *tsk) in restore_fp() argument [all …]
|
/arch/mn10300/kernel/ |
D | fpu.c | 38 struct task_struct *tsk = current; in fpu_exception() local 47 if (!is_using_fpu(tsk)) in fpu_exception() 54 info.si_addr = (void *) tsk->thread.uregs->pc; in fpu_exception() 57 unlazy_fpu(tsk); in fpu_exception() 59 fpcr = tsk->thread.fpu_state.fpcr; in fpu_exception() 70 force_sig_info(SIGFPE, &info, tsk); in fpu_exception() 78 struct task_struct *tsk = current; in fpu_setup_sigcontext() local 80 if (!is_using_fpu(tsk)) in fpu_setup_sigcontext() 90 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in fpu_setup_sigcontext() 91 fpu_save(&tsk->thread.fpu_state); in fpu_setup_sigcontext() [all …]
|
/arch/sh/kernel/cpu/ |
D | fpu.c | 11 int init_fpu(struct task_struct *tsk) in init_fpu() argument 13 if (tsk_used_math(tsk)) { in init_fpu() 14 if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current) in init_fpu() 15 unlazy_fpu(tsk, task_pt_regs(tsk)); in init_fpu() 22 if (!tsk->thread.xstate) { in init_fpu() 23 tsk->thread.xstate = kmem_cache_alloc(task_xstate_cachep, in init_fpu() 25 if (!tsk->thread.xstate) in init_fpu() 30 struct sh_fpu_hard_struct *fp = &tsk->thread.xstate->hardfpu; in init_fpu() 34 struct sh_fpu_soft_struct *fp = &tsk->thread.xstate->softfpu; in init_fpu() 39 set_stopped_child_used_math(tsk); in init_fpu() [all …]
|
/arch/sh/kernel/cpu/sh4/ |
D | fpu.c | 44 void save_fpu(struct task_struct *tsk) in save_fpu() argument 87 :"0"((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu() 94 void restore_fpu(struct task_struct *tsk) in restore_fpu() argument 137 :"0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu() 231 struct task_struct *tsk = current; in ieee_fpe_handler() local 233 if ((tsk->thread.xstate->hardfpu.fpscr & FPSCR_CAUSE_ERROR)) in ieee_fpe_handler() 235 denormal_to_double(&tsk->thread.xstate->hardfpu, in ieee_fpe_handler() 244 struct task_struct *tsk = current; in ieee_fpe_handler() local 251 hx = tsk->thread.xstate->hardfpu.fp_regs[n]; in ieee_fpe_handler() 252 hy = tsk->thread.xstate->hardfpu.fp_regs[m]; in ieee_fpe_handler() [all …]
|
/arch/powerpc/kernel/ |
D | signal.c | 103 static void do_signal(struct task_struct *tsk) in do_signal() argument 110 BUG_ON(tsk != current); in do_signal() 115 check_syscall_restart(tsk->thread.regs, &ksig.ka, ksig.sig > 0); in do_signal() 120 tsk->thread.regs->trap = 0; in do_signal() 130 if (tsk->thread.hw_brk.address && tsk->thread.hw_brk.type) in do_signal() 131 __set_breakpoint(&tsk->thread.hw_brk); in do_signal() 134 thread_change_pc(tsk, tsk->thread.regs); in do_signal() 138 ret = handle_rt_signal32(&ksig, oldset, tsk); in do_signal() 140 ret = handle_signal32(&ksig, oldset, tsk); in do_signal() 142 ret = handle_rt_signal64(&ksig, oldset, tsk); in do_signal() [all …]
|
D | signal_64.c | 95 struct task_struct *tsk, int signr, sigset_t *set, in setup_sigcontext() argument 110 struct pt_regs *regs = tsk->thread.regs; in setup_sigcontext() 114 BUG_ON(tsk != current); in setup_sigcontext() 120 if (tsk->thread.used_vr) { in setup_sigcontext() 121 flush_altivec_to_thread(tsk); in setup_sigcontext() 123 err |= __copy_to_user(v_regs, &tsk->thread.vr_state, in setup_sigcontext() 136 tsk->thread.vrsave = vrsave; in setup_sigcontext() 143 flush_fp_to_thread(tsk); in setup_sigcontext() 145 err |= copy_fpr_to_user(&sc->fp_regs, tsk); in setup_sigcontext() 158 if (tsk->thread.used_vsr && ctx_has_vsx_region) { in setup_sigcontext() [all …]
|
D | process.c | 80 static void check_if_tm_restore_required(struct task_struct *tsk) in check_if_tm_restore_required() argument 88 if (tsk == current && tsk->thread.regs && in check_if_tm_restore_required() 89 MSR_TM_ACTIVE(tsk->thread.regs->msr) && in check_if_tm_restore_required() 91 tsk->thread.ckpt_regs.msr = tsk->thread.regs->msr; in check_if_tm_restore_required() 102 static inline void check_if_tm_restore_required(struct task_struct *tsk) { } in check_if_tm_restore_required() argument 153 void __giveup_fpu(struct task_struct *tsk) in __giveup_fpu() argument 157 save_fpu(tsk); in __giveup_fpu() 158 msr = tsk->thread.regs->msr; in __giveup_fpu() 164 tsk->thread.regs->msr = msr; in __giveup_fpu() 167 void giveup_fpu(struct task_struct *tsk) in giveup_fpu() argument [all …]
|
/arch/sh/include/asm/ |
D | fpu.h | 27 #define save_fpu(tsk) do { } while (0) argument 28 #define restore_fpu(tsk) do { } while (0) argument 45 static inline void __unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) in __unlazy_fpu() argument 47 if (task_thread_info(tsk)->status & TS_USEDFPU) { in __unlazy_fpu() 48 task_thread_info(tsk)->status &= ~TS_USEDFPU; in __unlazy_fpu() 49 save_fpu(tsk); in __unlazy_fpu() 52 tsk->thread.fpu_counter = 0; in __unlazy_fpu() 55 static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) in unlazy_fpu() argument 58 __unlazy_fpu(tsk, regs); in unlazy_fpu() 62 static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) in clear_fpu() argument [all …]
|
D | switch_to_32.h | 7 #define is_dsp_enabled(tsk) \ argument 8 (!!(tsk->thread.dsp_status.status & SR_DSP)) 10 #define __restore_dsp(tsk) \ argument 13 (u32 *)&tsk->thread.dsp_status; \ 33 #define __save_dsp(tsk) \ argument 36 (u32 *)&tsk->thread.dsp_status + 14; \ 59 #define is_dsp_enabled(tsk) (0) argument 60 #define __save_dsp(tsk) do { } while (0) argument 61 #define __restore_dsp(tsk) do { } while (0) argument
|
/arch/arc/include/asm/ |
D | processor.h | 81 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->ret) argument 82 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp) argument 88 #define TSK_K_ESP(tsk) (tsk->thread.ksp) argument 90 #define TSK_K_REG(tsk, off) (*((unsigned long *)(TSK_K_ESP(tsk) + \ argument 93 #define TSK_K_BLINK(tsk) TSK_K_REG(tsk, 4) argument 94 #define TSK_K_FP(tsk) TSK_K_REG(tsk, 0) argument
|
/arch/arm64/kernel/ |
D | stacktrace.c | 44 int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) in unwind_frame() argument 51 if (!tsk) in unwind_frame() 52 tsk = current; in unwind_frame() 54 if (!on_accessible_stack(tsk, fp)) in unwind_frame() 61 if (tsk->ret_stack && in unwind_frame() 74 frame->pc = tsk->ret_stack[frame->graph--].ret; in unwind_frame() 91 void notrace walk_stackframe(struct task_struct *tsk, struct stackframe *frame, in walk_stackframe() argument 99 ret = unwind_frame(tsk, frame); in walk_stackframe() 151 static noinline void __save_stack_trace(struct task_struct *tsk, in __save_stack_trace() argument 157 if (!try_get_task_stack(tsk)) in __save_stack_trace() [all …]
|
/arch/arc/kernel/ |
D | stacktrace.c | 44 static void seed_unwind_frame_info(struct task_struct *tsk, in seed_unwind_frame_info() argument 52 if (tsk == NULL && regs == NULL) { in seed_unwind_frame_info() 76 frame_info->task = tsk; in seed_unwind_frame_info() 78 frame_info->regs.r27 = TSK_K_FP(tsk); in seed_unwind_frame_info() 79 frame_info->regs.r28 = TSK_K_ESP(tsk); in seed_unwind_frame_info() 80 frame_info->regs.r31 = TSK_K_BLINK(tsk); in seed_unwind_frame_info() 101 frame_info->task = tsk; in seed_unwind_frame_info() 114 arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs, in arc_unwind_core() argument 122 seed_unwind_frame_info(tsk, regs, &frame_info); in arc_unwind_core() 223 noinline void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs) in show_stacktrace() argument [all …]
|
/arch/ia64/include/asm/ |
D | thread_info.h | 46 #define INIT_THREAD_INFO(tsk) \ argument 48 .task = &tsk, \ 58 #define alloc_thread_stack_node(tsk, node) \ argument 59 ((unsigned long *) ((char *) (tsk) + IA64_TASK_SIZE)) 60 #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) argument 63 #define alloc_thread_stack_node(tsk, node) ((unsigned long *) 0) argument 64 #define task_thread_info(tsk) ((struct thread_info *) 0) argument 66 #define free_thread_stack(tsk) /* nothing */ argument 67 #define task_stack_page(tsk) ((void *)(tsk)) argument 91 #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) argument
|
/arch/powerpc/include/asm/ |
D | processor.h | 133 #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ argument 381 #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.regs) argument 385 #define KSTK_EIP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0) argument 386 #define KSTK_ESP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->gpr[1]: 0) argument 389 #define GET_FPEXC_CTL(tsk, adr) get_fpexc_mode((tsk), (adr)) argument 390 #define SET_FPEXC_CTL(tsk, val) set_fpexc_mode((tsk), (val)) argument 392 extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr); 393 extern int set_fpexc_mode(struct task_struct *tsk, unsigned int val); 395 #define GET_ENDIAN(tsk, adr) get_endian((tsk), (adr)) argument 396 #define SET_ENDIAN(tsk, val) set_endian((tsk), (val)) argument [all …]
|
/arch/sh/kernel/cpu/sh5/ |
D | fpu.c | 19 void save_fpu(struct task_struct *tsk) in save_fpu() argument 57 : "r" (&tsk->thread.xstate->hardfpu) in save_fpu() 61 void restore_fpu(struct task_struct *tsk) in restore_fpu() argument 100 : "r" (&tsk->thread.xstate->hardfpu) in restore_fpu() 106 struct task_struct *tsk = current; in do_fpu_error() local 110 force_sig(SIGFPE, tsk); in do_fpu_error()
|
/arch/arm64/include/asm/ |
D | stacktrace.h | 34 extern int unwind_frame(struct task_struct *tsk, struct stackframe *frame); 35 extern void walk_stackframe(struct task_struct *tsk, struct stackframe *frame, 37 extern void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk); 52 static inline bool on_task_stack(struct task_struct *tsk, unsigned long sp) in on_task_stack() argument 54 unsigned long low = (unsigned long)task_stack_page(tsk); in on_task_stack() 78 static inline bool on_accessible_stack(struct task_struct *tsk, unsigned long sp) in on_accessible_stack() argument 80 if (on_task_stack(tsk, sp)) in on_accessible_stack() 82 if (tsk != current || preemptible()) in on_accessible_stack()
|
/arch/sh/kernel/ |
D | dumpstack.c | 129 void show_trace(struct task_struct *tsk, unsigned long *sp, in show_trace() argument 137 unwind_stack(tsk, regs, sp, &print_trace_ops, ""); in show_trace() 141 if (!tsk) in show_trace() 142 tsk = current; in show_trace() 144 debug_show_held_locks(tsk); in show_trace() 147 void show_stack(struct task_struct *tsk, unsigned long *sp) in show_stack() argument 151 if (!tsk) in show_stack() 152 tsk = current; in show_stack() 153 if (tsk == current) in show_stack() 156 sp = (unsigned long *)tsk->thread.sp; in show_stack() [all …]
|
/arch/x86/um/asm/ |
D | processor.h | 14 #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP) argument 15 #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP) argument 16 #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP) argument
|
/arch/c6x/include/asm/ |
D | processor.h | 99 #define thread_saved_ksp(tsk) \ argument 100 (*(unsigned long *)&(tsk)->thread.b15_14) 101 #define thread_saved_dp(tsk) \ argument 102 (*(((unsigned long *)&(tsk)->thread.b15_14) + 1)) 104 #define thread_saved_ksp(tsk) \ argument 105 (*(((unsigned long *)&(tsk)->thread.b15_14) + 1)) 106 #define thread_saved_dp(tsk) \ argument 107 (*(unsigned long *)&(tsk)->thread.b15_14)
|
/arch/score/include/asm/ |
D | processor.h | 97 #define kstk_tos(tsk) \ argument 98 ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32) 99 #define task_pt_regs(tsk) ((struct pt_regs *)kstk_tos(tsk) - 1) argument 101 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) argument 102 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) argument
|
/arch/powerpc/mm/ |
D | mmu_context.c | 19 static inline void switch_mm_pgdir(struct task_struct *tsk, in switch_mm_pgdir() argument 23 tsk->thread.pgdir = mm->pgd; in switch_mm_pgdir() 26 static inline void switch_mm_pgdir(struct task_struct *tsk, in switch_mm_pgdir() argument 33 static inline void switch_mm_pgdir(struct task_struct *tsk, in switch_mm_pgdir() argument 47 struct task_struct *tsk) in switch_mm_irqs_off() argument 77 switch_mm_pgdir(tsk, next); in switch_mm_irqs_off() 97 switch_mmu_context(prev, next, tsk); in switch_mm_irqs_off()
|
/arch/metag/include/asm/ |
D | processor.h | 138 #define thread_saved_pc(tsk) \ argument 139 ((unsigned long)(tsk)->thread.kernel_context->CurrPC) 140 #define thread_saved_sp(tsk) \ argument 141 ((unsigned long)(tsk)->thread.kernel_context->AX[0].U0) 142 #define thread_saved_fp(tsk) \ argument 143 ((unsigned long)(tsk)->thread.kernel_context->AX[1].U0) 147 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->ctx.CurrPC) argument 148 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->ctx.AX[0].U0) argument 196 extern void show_trace(struct task_struct *tsk, unsigned long *sp,
|
/arch/sh/kernel/cpu/sh2a/ |
D | fpu.c | 30 void save_fpu(struct task_struct *tsk) in save_fpu() argument 55 : "0" ((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu() 63 void restore_fpu(struct task_struct *tsk) in restore_fpu() argument 87 : "0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu() 457 struct task_struct *tsk = current; in ieee_fpe_handler() local 459 if ((tsk->thread.xstate->hardfpu.fpscr & FPSCR_FPU_ERROR)) { in ieee_fpe_handler() 461 denormal_to_double (&tsk->thread.xstate->hardfpu, in ieee_fpe_handler() 469 struct task_struct *tsk = current; in ieee_fpe_handler() local 476 hx = tsk->thread.xstate->hardfpu.fp_regs[n]; in ieee_fpe_handler() 477 hy = tsk->thread.xstate->hardfpu.fp_regs[m]; in ieee_fpe_handler() [all …]
|