/Linux-v6.6/arch/x86/include/asm/trace/ |
D | fpu.h | 11 TP_PROTO(struct fpu *fpu), 12 TP_ARGS(fpu), 15 __field(struct fpu *, fpu) 22 __entry->fpu = fpu; 25 __entry->xfeatures = fpu->fpstate->regs.xsave.header.xfeatures; 26 __entry->xcomp_bv = fpu->fpstate->regs.xsave.header.xcomp_bv; 30 __entry->fpu, 38 TP_PROTO(struct fpu *fpu), 39 TP_ARGS(fpu) 43 TP_PROTO(struct fpu *fpu), [all …]
|
/Linux-v6.6/arch/x86/kernel/fpu/ |
D | core.c | 52 DEFINE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx); 92 static void update_avx_timestamp(struct fpu *fpu) in update_avx_timestamp() argument 97 if (fpu->fpstate->regs.xsave.header.xfeatures & AVX512_TRACKING_MASK) in update_avx_timestamp() 98 fpu->avx512_timestamp = jiffies; in update_avx_timestamp() 115 void save_fpregs_to_fpstate(struct fpu *fpu) in save_fpregs_to_fpstate() argument 118 os_xsave(fpu->fpstate); in save_fpregs_to_fpstate() 119 update_avx_timestamp(fpu); in save_fpregs_to_fpstate() 124 fxsave(&fpu->fpstate->regs.fxsave); in save_fpregs_to_fpstate() 132 asm volatile("fnsave %[fp]; fwait" : [fp] "=m" (fpu->fpstate->regs.fsave)); in save_fpregs_to_fpstate() 133 frstor(&fpu->fpstate->regs.fsave); in save_fpregs_to_fpstate() [all …]
|
D | context.h | 31 static inline void __fpu_invalidate_fpregs_state(struct fpu *fpu) in __fpu_invalidate_fpregs_state() argument 33 fpu->last_cpu = -1; in __fpu_invalidate_fpregs_state() 36 static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu) in fpregs_state_valid() argument 38 return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; in fpregs_state_valid() 41 static inline void fpregs_deactivate(struct fpu *fpu) in fpregs_deactivate() argument 44 trace_x86_fpu_regs_deactivated(fpu); in fpregs_deactivate() 47 static inline void fpregs_activate(struct fpu *fpu) in fpregs_activate() argument 49 __this_cpu_write(fpu_fpregs_owner_ctx, fpu); in fpregs_activate() 50 trace_x86_fpu_regs_activated(fpu); in fpregs_activate() 56 struct fpu *fpu = ¤t->thread.fpu; in fpregs_restore_userregs() local [all …]
|
D | regset.c | 46 static void sync_fpstate(struct fpu *fpu) in sync_fpstate() argument 48 if (fpu == ¤t->thread.fpu) in sync_fpstate() 49 fpu_sync_fpstate(fpu); in sync_fpstate() 60 static void fpu_force_restore(struct fpu *fpu) in fpu_force_restore() argument 66 WARN_ON_FPU(fpu == ¤t->thread.fpu); in fpu_force_restore() 68 __fpu_invalidate_fpregs_state(fpu); in fpu_force_restore() 74 struct fpu *fpu = &target->thread.fpu; in xfpregs_get() local 79 sync_fpstate(fpu); in xfpregs_get() 82 return membuf_write(&to, &fpu->fpstate->regs.fxsave, in xfpregs_get() 83 sizeof(fpu->fpstate->regs.fxsave)); in xfpregs_get() [all …]
|
D | signal.c | 41 fx_sw->xstate_size > current->thread.fpu.fpstate->user_size || in check_xstate_in_sigframe() 57 trace_x86_fpu_xstate_check_failed(¤t->thread.fpu); in check_xstate_in_sigframe() 72 struct xregs_state *xsave = &tsk->thread.fpu.fpstate->regs.xsave; in save_fsave_header() 78 fxsave(&tsk->thread.fpu.fpstate->regs.fxsave); in save_fsave_header() 191 struct fpstate *fpstate = tsk->thread.fpu.fpstate; in copy_fpstate_to_sigframe() 280 struct fpu *fpu = ¤t->thread.fpu; in restore_fpregs_from_user() local 286 xfd_update_state(fpu->fpstate); in restore_fpregs_from_user() 288 ret = __restore_fpregs_from_user(buf, fpu->fpstate->user_xfeatures, in restore_fpregs_from_user() 327 os_xrstor_supervisor(fpu->fpstate); in restore_fpregs_from_user() 338 struct fpu *fpu = &tsk->thread.fpu; in __fpu_restore_sig() local [all …]
|
D | xstate.c | 737 fpstate_reset(¤t->thread.fpu); in fpu__init_disable_system_xstate() 847 fpstate_reset(¤t->thread.fpu); in fpu__init_system_xstate() 921 wrmsrl(MSR_IA32_XFD, current->thread.fpu.fpstate->xfd); in fpu__resume_cpu() 1189 __copy_xstate_to_uabi_buf(to, tsk->thread.fpu.fpstate, in copy_xstate_to_uabi_buf() 1190 tsk->thread.fpu.fpstate->user_xfeatures, in copy_xstate_to_uabi_buf() 1330 return copy_uabi_to_xstate(tsk->thread.fpu.fpstate, NULL, ubuf, &tsk->thread.pkru); in copy_sigframe_from_user_to_xstate() 1424 if (fpstate->xfd == current->thread.fpu.fpstate->xfd) in xstate_op_valid() 1477 void fpstate_free(struct fpu *fpu) in arch_initcall() 1479 if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate) in arch_initcall() 1480 vfree(fpu->fpstate); in arch_initcall() [all …]
|
D | init.c | 41 fpstate_init_soft(¤t->thread.fpu.fpstate->regs.soft); in fpu__init_cpu_generic() 157 task_size -= sizeof(current->thread.fpu.__fpstate.regs); in fpu__init_task_struct_size() 172 CHECK_MEMBER_AT_END_OF(struct fpu, __fpstate); in fpu__init_task_struct_size() 173 CHECK_MEMBER_AT_END_OF(struct thread_struct, fpu); in fpu__init_task_struct_size() 207 fpstate_reset(¤t->thread.fpu); in fpu__init_system_xstate_size_legacy() 216 fpstate_reset(¤t->thread.fpu); in fpu__init_system()
|
D | xstate.h | 25 struct fpu *fpu = ¤t->group_leader->thread.fpu; in xstate_get_group_perm() local 29 perm = guest ? &fpu->guest_perm : &fpu->perm; in xstate_get_group_perm() 264 struct fpstate *fpstate = current->thread.fpu.fpstate; in xsave_to_user_sigframe() 295 xfd_validate_state(current->thread.fpu.fpstate, mask, true); in xrstor_from_user_sigframe()
|
/Linux-v6.6/arch/mips/kernel/ |
D | asm-offsets.c | 143 OFFSET(THREAD_FPU, task_struct, thread.fpu); in output_thread_fpu_defines() 145 OFFSET(THREAD_FPR0, task_struct, thread.fpu.fpr[0]); in output_thread_fpu_defines() 146 OFFSET(THREAD_FPR1, task_struct, thread.fpu.fpr[1]); in output_thread_fpu_defines() 147 OFFSET(THREAD_FPR2, task_struct, thread.fpu.fpr[2]); in output_thread_fpu_defines() 148 OFFSET(THREAD_FPR3, task_struct, thread.fpu.fpr[3]); in output_thread_fpu_defines() 149 OFFSET(THREAD_FPR4, task_struct, thread.fpu.fpr[4]); in output_thread_fpu_defines() 150 OFFSET(THREAD_FPR5, task_struct, thread.fpu.fpr[5]); in output_thread_fpu_defines() 151 OFFSET(THREAD_FPR6, task_struct, thread.fpu.fpr[6]); in output_thread_fpu_defines() 152 OFFSET(THREAD_FPR7, task_struct, thread.fpu.fpr[7]); in output_thread_fpu_defines() 153 OFFSET(THREAD_FPR8, task_struct, thread.fpu.fpr[8]); in output_thread_fpu_defines() [all …]
|
D | ptrace.c | 347 fcr31 = child->thread.fpu.fcr31; in ptrace_setfcr31() 349 child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); in ptrace_setfcr31() 369 __put_user(child->thread.fpu.fcr31, data + 64); in ptrace_getfpregs() 409 membuf_write(to, &target->thread.fpu, in fpr_get_fpa() 425 membuf_store(to, get_fpr64(&target->thread.fpu.fpr[i], 0)); in fpr_get_msa() 437 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_get() 442 membuf_write(&to, &target->thread.fpu.fcr31, sizeof(u32)); in fpr_get() 457 &target->thread.fpu, in fpr_set_fpa() 482 set_fpr64(&target->thread.fpu.fpr[i], 0, fpr_val); in fpr_set_msa() 517 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_set() [all …]
|
/Linux-v6.6/arch/loongarch/include/asm/ |
D | fpu.h | 31 extern void _save_lsx(struct loongarch_fpu *fpu); 32 extern void _restore_lsx(struct loongarch_fpu *fpu); 34 extern void _restore_lsx_upper(struct loongarch_fpu *fpu); 36 extern void _save_lasx(struct loongarch_fpu *fpu); 37 extern void _restore_lasx(struct loongarch_fpu *fpu); 39 extern void _restore_lasx_upper(struct loongarch_fpu *fpu); 113 _restore_fp(¤t->thread.fpu); in own_fpu_inatomic() 129 _save_fp(&tsk->thread.fpu); in lose_fpu_inatomic() 157 unsigned int fcsr = current->thread.fpu.fcsr; in init_fpu() 167 _save_fp(&tsk->thread.fpu); in save_fp() [all …]
|
/Linux-v6.6/arch/s390/include/asm/fpu/ |
D | internal.h | 41 static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) in fpregs_store() argument 44 fpregs->fpc = fpu->fpc; in fpregs_store() 46 convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs); in fpregs_store() 48 memcpy((freg_t *)&fpregs->fprs, fpu->fprs, in fpregs_store() 52 static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu) in fpregs_load() argument 54 fpu->fpc = fpregs->fpc; in fpregs_load() 56 convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs); in fpregs_load() 58 memcpy(fpu->fprs, (freg_t *)&fpregs->fprs, in fpregs_load()
|
/Linux-v6.6/arch/sparc/kernel/ |
D | sigutil_64.c | 15 int save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) in save_fpu_state() argument 23 err |= copy_to_user(&fpu->si_float_regs[0], fpregs, in save_fpu_state() 26 err |= copy_to_user(&fpu->si_float_regs[32], fpregs+16, in save_fpu_state() 28 err |= __put_user(current_thread_info()->xfsr[0], &fpu->si_fsr); in save_fpu_state() 29 err |= __put_user(current_thread_info()->gsr[0], &fpu->si_gsr); in save_fpu_state() 30 err |= __put_user(fprs, &fpu->si_fprs); in save_fpu_state() 35 int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) in restore_fpu_state() argument 41 if (((unsigned long) fpu) & 7) in restore_fpu_state() 44 err = get_user(fprs, &fpu->si_fprs); in restore_fpu_state() 48 err |= copy_from_user(fpregs, &fpu->si_float_regs[0], in restore_fpu_state() [all …]
|
D | sigutil_32.c | 15 int save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) in save_fpu_state() argument 35 err |= __copy_to_user(&fpu->si_float_regs[0], in save_fpu_state() 38 err |= __put_user(current->thread.fsr, &fpu->si_fsr); in save_fpu_state() 39 err |= __put_user(current->thread.fpqdepth, &fpu->si_fpqdepth); in save_fpu_state() 41 err |= __copy_to_user(&fpu->si_fpqueue[0], in save_fpu_state() 49 int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) in restore_fpu_state() argument 53 if (((unsigned long) fpu) & 3) in restore_fpu_state() 68 if (!access_ok(fpu, sizeof(*fpu))) in restore_fpu_state() 71 err = __copy_from_user(¤t->thread.float_regs[0], &fpu->si_float_regs[0], in restore_fpu_state() 73 err |= __get_user(current->thread.fsr, &fpu->si_fsr); in restore_fpu_state() [all …]
|
/Linux-v6.6/arch/x86/include/asm/fpu/ |
D | api.h | 115 extern int fpu__exception_code(struct fpu *fpu, int trap_nr); 116 extern void fpu_sync_fpstate(struct fpu *fpu); 132 DECLARE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx); 136 extern void fpstate_free(struct fpu *fpu); 138 static inline void fpstate_free(struct fpu *fpu) { } in fpstate_free() argument
|
D | sched.h | 12 extern void save_fpregs_to_fpstate(struct fpu *fpu); 13 extern void fpu__drop(struct fpu *fpu); 40 static inline void switch_fpu_prepare(struct fpu *old_fpu, int cpu) in switch_fpu_prepare()
|
/Linux-v6.6/arch/m68k/kernel/ |
D | process.c | 217 int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu) in elf_core_copy_task_fpregs() argument 222 memcpy(fpu->fpcntl, current->thread.fpcntl, 12); in elf_core_copy_task_fpregs() 223 memcpy(fpu->fpregs, current->thread.fp, 96); in elf_core_copy_task_fpregs() 228 fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) | in elf_core_copy_task_fpregs() 229 ((fpu->fpregs[i] & 0x0000ffff) << 16); in elf_core_copy_task_fpregs() 247 : "m" (fpu->fpcntl[0]), in elf_core_copy_task_fpregs() 248 "m" (fpu->fpcntl[1]), in elf_core_copy_task_fpregs() 249 "m" (fpu->fpcntl[2]), in elf_core_copy_task_fpregs() 250 "m" (fpu->fpregs[0]) in elf_core_copy_task_fpregs() 255 : "m" (fpu->fpcntl[0]) in elf_core_copy_task_fpregs() [all …]
|
D | setup_mm.c | 378 const char *cpu, *mmu, *fpu; in show_cpuinfo() local 408 fpu = "none(soft float)"; in show_cpuinfo() 411 fpu = "68881"; in show_cpuinfo() 413 fpu = "68882"; in show_cpuinfo() 415 fpu = "68040"; in show_cpuinfo() 417 fpu = "68060"; in show_cpuinfo() 419 fpu = "Sun FPA"; in show_cpuinfo() 421 fpu = "ColdFire"; in show_cpuinfo() 423 fpu = "none"; in show_cpuinfo() 451 cpu, mmu, fpu, in show_cpuinfo()
|
/Linux-v6.6/arch/loongarch/kernel/ |
D | kfpu.c | 36 _save_lasx(¤t->thread.fpu); in kernel_fpu_begin() 41 _save_lsx(¤t->thread.fpu); in kernel_fpu_begin() 45 _save_fp(¤t->thread.fpu); in kernel_fpu_begin() 61 _restore_lasx(¤t->thread.fpu); in kernel_fpu_end() 66 _restore_lsx(¤t->thread.fpu); in kernel_fpu_end() 70 _restore_fp(¤t->thread.fpu); in kernel_fpu_end()
|
D | signal.c | 87 struct _ctx_layout fpu; member 113 __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 0), in copy_fpu_to_sigcontext() 116 err |= __put_user(current->thread.fpu.fcc, fcc); in copy_fpu_to_sigcontext() 117 err |= __put_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_to_sigcontext() 133 set_fpr64(¤t->thread.fpu.fpr[i], 0, fpr_val); in copy_fpu_from_sigcontext() 135 err |= __get_user(current->thread.fpu.fcc, fcc); in copy_fpu_from_sigcontext() 136 err |= __get_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_from_sigcontext() 150 err |= __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 0), in copy_lsx_to_sigcontext() 152 err |= __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 1), in copy_lsx_to_sigcontext() 155 err |= __put_user(current->thread.fpu.fcc, fcc); in copy_lsx_to_sigcontext() [all …]
|
D | ptrace.c | 57 memset(&target->thread.fpu.fpr, ~0, sizeof(target->thread.fpu.fpr)); in init_fp_ctx() 123 return membuf_write(to, &target->thread.fpu.fpr, in gfpr_get() 134 fpr_val = get_fpr64(&target->thread.fpu.fpr[i], 0); in gfpr_get_simd() 153 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_get() 158 r = membuf_write(&to, &target->thread.fpu.fcc, sizeof(target->thread.fpu.fcc)); in fpr_get() 159 r = membuf_write(&to, &target->thread.fpu.fcsr, sizeof(target->thread.fpu.fcsr)); in fpr_get() 169 &target->thread.fpu.fpr, in gfpr_set() 187 set_fpr64(&target->thread.fpu.fpr[i], 0, fpr_val); in gfpr_set_simd() 212 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_set() 220 &target->thread.fpu.fcc, fcc_start, in fpr_set() [all …]
|
/Linux-v6.6/arch/s390/kernel/ |
D | fpu.c | 180 struct fpu *state = ¤t->thread.fpu; in __load_fpu_regs() 181 unsigned long *regs = current->thread.fpu.regs; in __load_fpu_regs() 224 struct fpu *state; in save_fpu_regs() 231 state = ¤t->thread.fpu; in save_fpu_regs() 232 regs = current->thread.fpu.regs; in save_fpu_regs()
|
/Linux-v6.6/arch/arc/kernel/ |
D | fpu.c | 34 unsigned int *saveto = &prev->thread.fpu.aux_dpfp[0].l; in fpu_save_restore() 35 unsigned int *readfrom = &next->thread.fpu.aux_dpfp[0].l; in fpu_save_restore() 71 struct arc_fpu *save = &prev->thread.fpu; in fpu_save_restore() 72 struct arc_fpu *restore = &next->thread.fpu; in fpu_save_restore()
|
/Linux-v6.6/arch/mips/loongson64/ |
D | cop2-ex.c | 98 set_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lswc2_format.rt], 0, value); in loongson_cu2_call() 99 set_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lswc2_format.rq], 0, value_next); in loongson_cu2_call() 131 value_next = get_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lswc2_format.rq], 0); in loongson_cu2_call() 137 value = get_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lswc2_format.rt], 0); in loongson_cu2_call() 203 set_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0, value); in loongson_cu2_call() 219 set_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0, value); in loongson_cu2_call() 283 value = get_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0); in loongson_cu2_call() 301 value = get_fpr64(¤t->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0); in loongson_cu2_call()
|
/Linux-v6.6/tools/testing/selftests/kvm/s390x/ |
D | resets.c | 90 struct kvm_fpu fpu; in assert_clear() local 98 vcpu_fpu_get(vcpu, &fpu); in assert_clear() 99 TEST_ASSERT(!memcmp(&fpu.fprs, regs_null, sizeof(fpu.fprs)), "fprs == 0"); in assert_clear() 133 struct kvm_fpu fpu; in assert_initial() local 162 vcpu_fpu_get(vcpu, &fpu); in assert_initial() 163 TEST_ASSERT(!fpu.fpc, "fpc == 0"); in assert_initial()
|