/linux-6.12.1/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-6.12.1/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() 82 struct xregs_state *xsave = &tsk->thread.fpu.fpstate->regs.xsave; in save_fsave_header() 88 fxsave(&tsk->thread.fpu.fpstate->regs.fxsave); in save_fsave_header() 208 struct fpstate *fpstate = tsk->thread.fpu.fpstate; in copy_fpstate_to_sigframe() 296 struct fpu *fpu = ¤t->thread.fpu; in restore_fpregs_from_user() local 300 xrestore &= fpu->fpstate->user_xfeatures; in restore_fpregs_from_user() 304 xfd_update_state(fpu->fpstate); in restore_fpregs_from_user() 306 ret = __restore_fpregs_from_user(buf, fpu->fpstate->user_xfeatures, in restore_fpregs_from_user() 330 if (!fault_in_readable(buf, fpu->fpstate->user_size)) in restore_fpregs_from_user() [all …]
|
D | xstate.c | 741 fpstate_reset(¤t->thread.fpu); in fpu__init_disable_system_xstate() 854 fpstate_reset(¤t->thread.fpu); in fpu__init_system_xstate() 928 wrmsrl(MSR_IA32_XFD, current->thread.fpu.fpstate->xfd); in fpu__resume_cpu() 1210 __copy_xstate_to_uabi_buf(to, tsk->thread.fpu.fpstate, in copy_xstate_to_uabi_buf() 1211 tsk->thread.fpu.fpstate->user_xfeatures, in copy_xstate_to_uabi_buf() 1351 return copy_uabi_to_xstate(tsk->thread.fpu.fpstate, NULL, ubuf, &tsk->thread.pkru); in copy_sigframe_from_user_to_xstate() 1445 if (fpstate->xfd == current->thread.fpu.fpstate->xfd) in xstate_op_valid() 1498 void fpstate_free(struct fpu *fpu) in arch_initcall() 1500 if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate) in arch_initcall() 1501 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() 266 struct fpstate *fpstate = current->thread.fpu.fpstate; in xsave_to_user_sigframe() 297 xfd_validate_state(current->thread.fpu.fpstate, mask, true); in xrstor_from_user_sigframe()
|
/linux-6.12.1/arch/mips/kernel/ |
D | asm-offsets.c | 144 OFFSET(THREAD_FPU, task_struct, thread.fpu); in output_thread_fpu_defines() 146 OFFSET(THREAD_FPR0, task_struct, thread.fpu.fpr[0]); in output_thread_fpu_defines() 147 OFFSET(THREAD_FPR1, task_struct, thread.fpu.fpr[1]); in output_thread_fpu_defines() 148 OFFSET(THREAD_FPR2, task_struct, thread.fpu.fpr[2]); in output_thread_fpu_defines() 149 OFFSET(THREAD_FPR3, task_struct, thread.fpu.fpr[3]); in output_thread_fpu_defines() 150 OFFSET(THREAD_FPR4, task_struct, thread.fpu.fpr[4]); in output_thread_fpu_defines() 151 OFFSET(THREAD_FPR5, task_struct, thread.fpu.fpr[5]); in output_thread_fpu_defines() 152 OFFSET(THREAD_FPR6, task_struct, thread.fpu.fpr[6]); in output_thread_fpu_defines() 153 OFFSET(THREAD_FPR7, task_struct, thread.fpu.fpr[7]); in output_thread_fpu_defines() 154 OFFSET(THREAD_FPR8, task_struct, thread.fpu.fpr[8]); in output_thread_fpu_defines() [all …]
|
D | ptrace.c | 354 fcr31 = child->thread.fpu.fcr31; in ptrace_setfcr31() 356 child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); in ptrace_setfcr31() 376 __put_user(child->thread.fpu.fcr31, data + 64); in ptrace_getfpregs() 416 membuf_write(to, &target->thread.fpu, in fpr_get_fpa() 432 membuf_store(to, get_fpr64(&target->thread.fpu.fpr[i], 0)); in fpr_get_msa() 444 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_get() 449 membuf_write(&to, &target->thread.fpu.fcr31, sizeof(u32)); in fpr_get() 464 &target->thread.fpu, in fpr_set_fpa() 489 set_fpr64(&target->thread.fpu.fpr[i], 0, fpr_val); in fpr_set_msa() 524 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_set() [all …]
|
/linux-6.12.1/arch/loongarch/include/asm/ |
D | fpu.h | 32 extern void _save_lsx(struct loongarch_fpu *fpu); 33 extern void _restore_lsx(struct loongarch_fpu *fpu); 35 extern void _restore_lsx_upper(struct loongarch_fpu *fpu); 37 extern void _save_lasx(struct loongarch_fpu *fpu); 38 extern void _restore_lasx(struct loongarch_fpu *fpu); 40 extern void _restore_lasx_upper(struct loongarch_fpu *fpu); 114 _restore_fp(¤t->thread.fpu); in own_fpu_inatomic() 130 _save_fp(&tsk->thread.fpu); in lose_fpu_inatomic() 158 unsigned int fcsr = current->thread.fpu.fcsr; in init_fpu() 168 _save_fp(&tsk->thread.fpu); in save_fp() [all …]
|
D | kvm_vcpu.h | 54 void kvm_save_fpu(struct loongarch_fpu *fpu); 55 void kvm_restore_fpu(struct loongarch_fpu *fpu); 56 void kvm_restore_fcsr(struct loongarch_fpu *fpu); 60 void kvm_save_lsx(struct loongarch_fpu *fpu); 61 void kvm_restore_lsx(struct loongarch_fpu *fpu); 64 static inline void kvm_save_lsx(struct loongarch_fpu *fpu) { } in kvm_save_lsx() argument 65 static inline void kvm_restore_lsx(struct loongarch_fpu *fpu) { } in kvm_restore_lsx() argument 70 void kvm_save_lasx(struct loongarch_fpu *fpu); 71 void kvm_restore_lasx(struct loongarch_fpu *fpu); 74 static inline void kvm_save_lasx(struct loongarch_fpu *fpu) { } in kvm_save_lasx() argument [all …]
|
/linux-6.12.1/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-6.12.1/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); 44 struct fpu *old_fpu = &old->thread.fpu; in switch_fpu_prepare()
|
/linux-6.12.1/arch/m68k/kernel/ |
D | process.c | 218 int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu) in elf_core_copy_task_fpregs() argument 223 memcpy(fpu->fpcntl, current->thread.fpcntl, 12); in elf_core_copy_task_fpregs() 224 memcpy(fpu->fpregs, current->thread.fp, 96); in elf_core_copy_task_fpregs() 229 fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) | in elf_core_copy_task_fpregs() 230 ((fpu->fpregs[i] & 0x0000ffff) << 16); in elf_core_copy_task_fpregs() 248 : "m" (fpu->fpcntl[0]), in elf_core_copy_task_fpregs() 249 "m" (fpu->fpcntl[1]), in elf_core_copy_task_fpregs() 250 "m" (fpu->fpcntl[2]), in elf_core_copy_task_fpregs() 251 "m" (fpu->fpregs[0]) in elf_core_copy_task_fpregs() 256 : "m" (fpu->fpcntl[0]) in elf_core_copy_task_fpregs() [all …]
|
D | setup_mm.c | 376 const char *cpu, *mmu, *fpu; in show_cpuinfo() local 406 fpu = "none(soft float)"; in show_cpuinfo() 409 fpu = "68881"; in show_cpuinfo() 411 fpu = "68882"; in show_cpuinfo() 413 fpu = "68040"; in show_cpuinfo() 415 fpu = "68060"; in show_cpuinfo() 417 fpu = "Sun FPA"; in show_cpuinfo() 419 fpu = "ColdFire"; in show_cpuinfo() 421 fpu = "none"; in show_cpuinfo() 449 cpu, mmu, fpu, in show_cpuinfo()
|
/linux-6.12.1/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 | 88 struct _ctx_layout fpu; member 114 __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 0), in copy_fpu_to_sigcontext() 117 err |= __put_user(current->thread.fpu.fcc, fcc); in copy_fpu_to_sigcontext() 118 err |= __put_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_to_sigcontext() 134 set_fpr64(¤t->thread.fpu.fpr[i], 0, fpr_val); in copy_fpu_from_sigcontext() 136 err |= __get_user(current->thread.fpu.fcc, fcc); in copy_fpu_from_sigcontext() 137 err |= __get_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_from_sigcontext() 151 err |= __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 0), in copy_lsx_to_sigcontext() 153 err |= __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 1), in copy_lsx_to_sigcontext() 156 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-6.12.1/arch/s390/include/asm/ |
D | fpu.h | 82 void load_fpu_state(struct fpu *state, int flags); 83 void save_fpu_state(struct fpu *state, int flags); 282 static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) in fpregs_store() argument 285 fpregs->fpc = fpu->fpc; in fpregs_store() 286 convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs); in fpregs_store() 289 static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu) in fpregs_load() argument 291 fpu->fpc = fpregs->fpc; in fpregs_load() 292 convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs); in fpregs_load()
|
/linux-6.12.1/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-6.12.1/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-6.12.1/arch/mips/kvm/ |
D | mips.c | 651 struct mips_fpu_struct *fpu = &vcpu->arch.fpu; in kvm_mips_get_reg() local 681 v = get_fpr32(&fpu->fpr[idx], 0); in kvm_mips_get_reg() 683 v = get_fpr32(&fpu->fpr[idx & ~1], idx & 1); in kvm_mips_get_reg() 692 v = get_fpr64(&fpu->fpr[idx], 0); in kvm_mips_get_reg() 702 v = fpu->fcr31; in kvm_mips_get_reg() 715 vs[0] = get_fpr64(&fpu->fpr[idx], 0); in kvm_mips_get_reg() 716 vs[1] = get_fpr64(&fpu->fpr[idx], 1); in kvm_mips_get_reg() 719 vs[0] = get_fpr64(&fpu->fpr[idx], 1); in kvm_mips_get_reg() 720 vs[1] = get_fpr64(&fpu->fpr[idx], 0); in kvm_mips_get_reg() 731 v = fpu->msacsr; in kvm_mips_get_reg() [all …]
|