Home
last modified time | relevance | path

Searched refs:fpu (Results 1 – 25 of 149) sorted by relevance

123456

/linux-6.1.9/arch/x86/include/asm/trace/ !
Dfpu.h11 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.1.9/arch/x86/kernel/fpu/ !
Dcore.c52 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 …]
Dcontext.h32 static inline void __fpu_invalidate_fpregs_state(struct fpu *fpu) in __fpu_invalidate_fpregs_state() argument
34 fpu->last_cpu = -1; in __fpu_invalidate_fpregs_state()
37 static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu) in fpregs_state_valid() argument
39 return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; in fpregs_state_valid()
42 static inline void fpregs_deactivate(struct fpu *fpu) in fpregs_deactivate() argument
45 trace_x86_fpu_regs_deactivated(fpu); in fpregs_deactivate()
48 static inline void fpregs_activate(struct fpu *fpu) in fpregs_activate() argument
50 __this_cpu_write(fpu_fpregs_owner_ctx, fpu); in fpregs_activate()
51 trace_x86_fpu_regs_activated(fpu); in fpregs_activate()
57 struct fpu *fpu = &current->thread.fpu; in fpregs_restore_userregs() local
[all …]
Dregset.c45 static void sync_fpstate(struct fpu *fpu) in sync_fpstate() argument
47 if (fpu == &current->thread.fpu) in sync_fpstate()
48 fpu_sync_fpstate(fpu); in sync_fpstate()
59 static void fpu_force_restore(struct fpu *fpu) in fpu_force_restore() argument
65 WARN_ON_FPU(fpu == &current->thread.fpu); in fpu_force_restore()
67 __fpu_invalidate_fpregs_state(fpu); in fpu_force_restore()
73 struct fpu *fpu = &target->thread.fpu; in xfpregs_get() local
78 sync_fpstate(fpu); in xfpregs_get()
81 return membuf_write(&to, &fpu->fpstate->regs.fxsave, in xfpregs_get()
82 sizeof(fpu->fpstate->regs.fxsave)); in xfpregs_get()
[all …]
Dsignal.c41 fx_sw->xstate_size > current->thread.fpu.fpstate->user_size || in check_xstate_in_sigframe()
57 trace_x86_fpu_xstate_check_failed(&current->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 = &current->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 …]
Dxstate.c741 fpstate_reset(&current->thread.fpu); in fpu__init_disable_system_xstate()
851 fpstate_reset(&current->thread.fpu); in fpu__init_system_xstate()
918 wrmsrl(MSR_IA32_XFD, current->thread.fpu.fpstate->xfd); in fpu__resume_cpu()
1186 __copy_xstate_to_uabi_buf(to, tsk->thread.fpu.fpstate, in copy_xstate_to_uabi_buf()
1326 return copy_uabi_to_xstate(tsk->thread.fpu.fpstate, NULL, ubuf, &tsk->thread.pkru); in copy_sigframe_from_user_to_xstate()
1420 if (fpstate->xfd == current->thread.fpu.fpstate->xfd) in xstate_op_valid()
1473 void fpstate_free(struct fpu *fpu) in arch_initcall()
1475 if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate) in arch_initcall()
1476 vfree(fpu->fpstate); in arch_initcall()
1497 struct fpu *fpu = &current->thread.fpu; in fpstate_realloc() local
[all …]
Dinit.c41 fpstate_init_soft(&current->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(&current->thread.fpu); in fpu__init_system_xstate_size_legacy()
216 fpstate_reset(&current->thread.fpu); in fpu__init_system()
Dxstate.h25 struct fpu *fpu = &current->group_leader->thread.fpu; in xstate_get_group_perm() local
29 perm = guest ? &fpu->guest_perm : &fpu->perm; in xstate_get_group_perm()
263 struct fpstate *fpstate = current->thread.fpu.fpstate; in xsave_to_user_sigframe()
294 xfd_validate_state(current->thread.fpu.fpstate, mask, true); in xrstor_from_user_sigframe()
/linux-6.1.9/arch/mips/kernel/ !
Dasm-offsets.c138 OFFSET(THREAD_FPU, task_struct, thread.fpu); in output_thread_fpu_defines()
140 OFFSET(THREAD_FPR0, task_struct, thread.fpu.fpr[0]); in output_thread_fpu_defines()
141 OFFSET(THREAD_FPR1, task_struct, thread.fpu.fpr[1]); in output_thread_fpu_defines()
142 OFFSET(THREAD_FPR2, task_struct, thread.fpu.fpr[2]); in output_thread_fpu_defines()
143 OFFSET(THREAD_FPR3, task_struct, thread.fpu.fpr[3]); in output_thread_fpu_defines()
144 OFFSET(THREAD_FPR4, task_struct, thread.fpu.fpr[4]); in output_thread_fpu_defines()
145 OFFSET(THREAD_FPR5, task_struct, thread.fpu.fpr[5]); in output_thread_fpu_defines()
146 OFFSET(THREAD_FPR6, task_struct, thread.fpu.fpr[6]); in output_thread_fpu_defines()
147 OFFSET(THREAD_FPR7, task_struct, thread.fpu.fpr[7]); in output_thread_fpu_defines()
148 OFFSET(THREAD_FPR8, task_struct, thread.fpu.fpr[8]); in output_thread_fpu_defines()
[all …]
Dptrace.c347 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-6.1.9/arch/s390/include/asm/fpu/ !
Dinternal.h41 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-6.1.9/arch/sparc/kernel/ !
Dsigutil_64.c15 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 …]
Dsigutil_32.c15 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(&current->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.1.9/arch/x86/include/asm/fpu/ !
Dapi.h106 extern int fpu__exception_code(struct fpu *fpu, int trap_nr);
107 extern void fpu_sync_fpstate(struct fpu *fpu);
123 DECLARE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx);
127 extern void fpstate_free(struct fpu *fpu);
129 static inline void fpstate_free(struct fpu *fpu) { } in fpstate_free() argument
Dsched.h12 extern void save_fpregs_to_fpstate(struct fpu *fpu);
13 extern void fpu__drop(struct fpu *fpu);
39 static inline void switch_fpu_prepare(struct fpu *old_fpu, int cpu) in switch_fpu_prepare()
/linux-6.1.9/arch/m68k/kernel/ !
Dprocess.c216 int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu) in dump_fpu() argument
221 memcpy(fpu->fpcntl, current->thread.fpcntl, 12); in dump_fpu()
222 memcpy(fpu->fpregs, current->thread.fp, 96); in dump_fpu()
227 fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) | in dump_fpu()
228 ((fpu->fpregs[i] & 0x0000ffff) << 16); in dump_fpu()
246 : "m" (fpu->fpcntl[0]), in dump_fpu()
247 "m" (fpu->fpcntl[1]), in dump_fpu()
248 "m" (fpu->fpcntl[2]), in dump_fpu()
249 "m" (fpu->fpregs[0]) in dump_fpu()
254 : "m" (fpu->fpcntl[0]) in dump_fpu()
[all …]
Dsetup_mm.c377 const char *cpu, *mmu, *fpu; in show_cpuinfo() local
407 fpu = "none(soft float)"; in show_cpuinfo()
410 fpu = "68881"; in show_cpuinfo()
412 fpu = "68882"; in show_cpuinfo()
414 fpu = "68040"; in show_cpuinfo()
416 fpu = "68060"; in show_cpuinfo()
418 fpu = "Sun FPA"; in show_cpuinfo()
420 fpu = "ColdFire"; in show_cpuinfo()
422 fpu = "none"; in show_cpuinfo()
450 cpu, mmu, fpu, in show_cpuinfo()
/linux-6.1.9/arch/loongarch/include/asm/ !
Dfpu.h67 _restore_fp(&current->thread.fpu); in own_fpu_inatomic()
82 _save_fp(&tsk->thread.fpu); in lose_fpu_inatomic()
98 unsigned int fcsr = current->thread.fpu.fcsr; in init_fpu()
108 _save_fp(&tsk->thread.fpu); in save_fp()
114 _restore_fp(&tsk->thread.fpu); in restore_fp()
122 _save_fp(&current->thread.fpu); in get_fpu_regs()
126 return tsk->thread.fpu.fpr; in get_fpu_regs()
/linux-6.1.9/arch/loongarch/kernel/ !
Dptrace.c52 memset(&target->thread.fpu.fpr, ~0, sizeof(target->thread.fpu.fpr)); in init_fp_ctx()
118 return membuf_write(to, &target->thread.fpu.fpr, in gfpr_get()
129 fpr_val = get_fpr64(&target->thread.fpu.fpr[i], 0); in gfpr_get_simd()
146 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_get()
151 r = membuf_write(&to, &target->thread.fpu.fcc, sizeof(target->thread.fpu.fcc)); in fpr_get()
152 r = membuf_write(&to, &target->thread.fpu.fcsr, sizeof(target->thread.fpu.fcsr)); in fpr_get()
162 &target->thread.fpu.fpr, in gfpr_set()
180 set_fpr64(&target->thread.fpu.fpr[i], 0, fpr_val); in gfpr_set_simd()
205 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_set()
213 &target->thread.fpu.fcc, fcc_start, in fpr_set()
[all …]
Dsignal.c67 struct _ctx_layout fpu; member
90 __put_user(get_fpr64(&current->thread.fpu.fpr[i], 0), in copy_fpu_to_sigcontext()
93 err |= __put_user(current->thread.fpu.fcc, fcc); in copy_fpu_to_sigcontext()
94 err |= __put_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_to_sigcontext()
110 set_fpr64(&current->thread.fpu.fpr[i], 0, fpr_val); in copy_fpu_from_sigcontext()
112 err |= __get_user(current->thread.fpu.fcc, fcc); in copy_fpu_from_sigcontext()
113 err |= __get_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_from_sigcontext()
164 struct sctx_info __user *info = extctx->fpu.addr; in protected_save_fpu_context()
179 err |= __put_user(extctx->fpu.size, &info->size); in protected_save_fpu_context()
198 struct sctx_info __user *info = extctx->fpu.addr; in protected_restore_fpu_context()
[all …]
/linux-6.1.9/arch/s390/kernel/ !
Dfpu.c181 struct fpu *state = &current->thread.fpu; in __load_fpu_regs()
182 unsigned long *regs = current->thread.fpu.regs; in __load_fpu_regs()
225 struct fpu *state; in save_fpu_regs()
232 state = &current->thread.fpu; in save_fpu_regs()
233 regs = current->thread.fpu.regs; in save_fpu_regs()
/linux-6.1.9/arch/arc/kernel/ !
Dfpu.c34 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.1.9/arch/mips/loongson64/ !
Dcop2-ex.c98 set_fpr64(&current->thread.fpu.fpr[insn.loongson3_lswc2_format.rt], 0, value); in loongson_cu2_call()
99 set_fpr64(&current->thread.fpu.fpr[insn.loongson3_lswc2_format.rq], 0, value_next); in loongson_cu2_call()
131 value_next = get_fpr64(&current->thread.fpu.fpr[insn.loongson3_lswc2_format.rq], 0); in loongson_cu2_call()
137 value = get_fpr64(&current->thread.fpu.fpr[insn.loongson3_lswc2_format.rt], 0); in loongson_cu2_call()
203 set_fpr64(&current->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0, value); in loongson_cu2_call()
219 set_fpr64(&current->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0, value); in loongson_cu2_call()
283 value = get_fpr64(&current->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0); in loongson_cu2_call()
301 value = get_fpr64(&current->thread.fpu.fpr[insn.loongson3_lsdc2_format.rt], 0); in loongson_cu2_call()
/linux-6.1.9/tools/testing/selftests/kvm/s390x/ !
Dresets.c90 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()
/linux-6.1.9/arch/m68k/math-emu/ !
Dfp_movem.S74 printf PDECODE,"->" | fpu -> cpu
76 1: printf PDECODE,"<-" | fpu <- cpu
132 swap %d1 | get fpu register list
141 | move register from memory into fpu
161 | move register from fpu into memory
218 printf PDECODE,"->" | fpu -> cpu
220 1: printf PDECODE,"<-" | fpu <- cpu
319 swap %d1 | get fpu register list
325 | move register from memory into fpu
336 | move register from fpu into memory

123456