Home
last modified time | relevance | path

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

1234567

/kernel/linux/linux-5.10/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->state.xsave.header.xfeatures;
26 __entry->xcomp_bv = fpu->state.xsave.header.xcomp_bv;
30 __entry->fpu,
38 TP_PROTO(struct fpu *fpu),
39 TP_ARGS(fpu)
43 TP_PROTO(struct fpu *fpu),
[all …]
/kernel/linux/linux-5.10/arch/x86/kernel/fpu/
Dcore.c44 DEFINE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx);
95 int copy_fpregs_to_fpstate(struct fpu *fpu) in copy_fpregs_to_fpstate() argument
98 copy_xregs_to_kernel(&fpu->state.xsave); in copy_fpregs_to_fpstate()
104 if (fpu->state.xsave.header.xfeatures & XFEATURE_MASK_AVX512) in copy_fpregs_to_fpstate()
105 fpu->avx512_timestamp = jiffies; in copy_fpregs_to_fpstate()
110 copy_fxregs_to_kernel(fpu); in copy_fpregs_to_fpstate()
118 asm volatile("fnsave %[fp]; fwait" : [fp] "=m" (fpu->state.fsave)); in copy_fpregs_to_fpstate()
140 copy_fpregs_to_fpstate(&current->thread.fpu); in kernel_fpu_begin_mask()
167 void fpu__save(struct fpu *fpu) in fpu__save() argument
169 WARN_ON_FPU(fpu != &current->thread.fpu); in fpu__save()
[all …]
Dregset.c32 struct fpu *fpu = &target->thread.fpu; in xfpregs_get() local
37 fpu__prepare_read(fpu); in xfpregs_get()
38 fpstate_sanitize_xstate(fpu); in xfpregs_get()
40 return membuf_write(&to, &fpu->state.fxsave, sizeof(struct fxregs_state)); in xfpregs_get()
47 struct fpu *fpu = &target->thread.fpu; in xfpregs_set() local
53 fpu__prepare_write(fpu); in xfpregs_set()
54 fpstate_sanitize_xstate(fpu); in xfpregs_set()
57 &fpu->state.fxsave, 0, -1); in xfpregs_set()
62 fpu->state.fxsave.mxcsr &= mxcsr_feature_mask; in xfpregs_set()
69 fpu->state.xsave.header.xfeatures |= XFEATURE_MASK_FPSSE; in xfpregs_set()
[all …]
Dsignal.c61 struct xregs_state *xsave = &tsk->thread.fpu.state.xsave; in save_fsave_header()
67 copy_fxregs_to_kernel(&tsk->thread.fpu); in save_fsave_header()
286 struct fpu *fpu = &tsk->thread.fpu; in __fpu__restore_sig() local
296 fpu__clear_user_states(fpu); in __fpu__restore_sig()
322 trace_x86_fpu_xstate_check_failed(fpu); in __fpu__restore_sig()
360 copy_kernel_to_xregs(&fpu->state.xsave, in __fpu__restore_sig()
412 copy_supervisor_to_kernel(&fpu->state.xsave); in __fpu__restore_sig()
415 __fpu_invalidate_fpregs_state(fpu); in __fpu__restore_sig()
421 ret = copy_user_to_xstate(&fpu->state.xsave, buf_fx); in __fpu__restore_sig()
425 sanitize_restored_user_xstate(&fpu->state, envp, user_xfeatures, in __fpu__restore_sig()
[all …]
Dinit.c37 fpstate_init_soft(&current->thread.fpu.state.soft); in fpu__init_cpu_generic()
165 task_size -= sizeof(((struct task_struct *)0)->thread.fpu.state); in fpu__init_task_struct_size()
180 CHECK_MEMBER_AT_END_OF(struct fpu, state); in fpu__init_task_struct_size()
181 CHECK_MEMBER_AT_END_OF(struct thread_struct, fpu); in fpu__init_task_struct_size()
/kernel/linux/linux-5.10/arch/x86/include/asm/fpu/
Dinternal.h29 extern void fpu__prepare_read(struct fpu *fpu);
30 extern void fpu__prepare_write(struct fpu *fpu);
31 extern void fpu__save(struct fpu *fpu);
33 extern void fpu__drop(struct fpu *fpu);
35 extern void fpu__clear_user_states(struct fpu *fpu);
36 extern void fpu__clear_all(struct fpu *fpu);
37 extern int fpu__exception_code(struct fpu *fpu, int trap_nr);
104 extern void fpstate_sanitize_xstate(struct fpu *fpu);
200 static inline void copy_fxregs_to_kernel(struct fpu *fpu) in copy_fxregs_to_kernel() argument
203 asm volatile( "fxsave %[fx]" : [fx] "=m" (fpu->state.fxsave)); in copy_fxregs_to_kernel()
[all …]
/kernel/linux/linux-5.10/arch/mips/kernel/
Dasm-offsets.c140 OFFSET(THREAD_FPU, task_struct, thread.fpu); in output_thread_fpu_defines()
142 OFFSET(THREAD_FPR0, task_struct, thread.fpu.fpr[0]); in output_thread_fpu_defines()
143 OFFSET(THREAD_FPR1, task_struct, thread.fpu.fpr[1]); in output_thread_fpu_defines()
144 OFFSET(THREAD_FPR2, task_struct, thread.fpu.fpr[2]); in output_thread_fpu_defines()
145 OFFSET(THREAD_FPR3, task_struct, thread.fpu.fpr[3]); in output_thread_fpu_defines()
146 OFFSET(THREAD_FPR4, task_struct, thread.fpu.fpr[4]); in output_thread_fpu_defines()
147 OFFSET(THREAD_FPR5, task_struct, thread.fpu.fpr[5]); in output_thread_fpu_defines()
148 OFFSET(THREAD_FPR6, task_struct, thread.fpu.fpr[6]); in output_thread_fpu_defines()
149 OFFSET(THREAD_FPR7, task_struct, thread.fpu.fpr[7]); in output_thread_fpu_defines()
150 OFFSET(THREAD_FPR8, task_struct, thread.fpu.fpr[8]); in output_thread_fpu_defines()
[all …]
Dptrace.c348 fcr31 = child->thread.fpu.fcr31; in ptrace_setfcr31()
350 child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); in ptrace_setfcr31()
370 __put_user(child->thread.fpu.fcr31, data + 64); in ptrace_getfpregs()
410 membuf_write(to, &target->thread.fpu, in fpr_get_fpa()
426 membuf_store(to, get_fpr64(&target->thread.fpu.fpr[i], 0)); in fpr_get_msa()
438 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_get()
443 membuf_write(&to, &target->thread.fpu.fcr31, sizeof(u32)); in fpr_get()
458 &target->thread.fpu, in fpr_set_fpa()
483 set_fpr64(&target->thread.fpu.fpr[i], 0, fpr_val); in fpr_set_msa()
518 if (sizeof(target->thread.fpu.fpr[0]) == sizeof(elf_fpreg_t)) in fpr_set()
[all …]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/arch/nds32/kernel/
Dfpu.c46 : "r" (&tsk->thread.fpu) in save_fpu()
59 : "r" (&tsk->thread.fpu) in save_fpu()
68 : "r" (&tsk->thread.fpu) in save_fpu()
79 : "r"(&tsk->thread.fpu) in save_fpu()
176 load_fpu(&current->thread.fpu); in do_fpu_context_switch()
181 current->thread.fpu.UDF_IEX_trap = init_fpuregs.UDF_IEX_trap; in do_fpu_context_switch()
215 fpcsr = current->thread.fpu.fpcsr; in handle_fpu_exception()
218 si_signo = do_fpuemu(regs, &current->thread.fpu); in handle_fpu_exception()
219 fpcsr = current->thread.fpu.fpcsr; in handle_fpu_exception()
221 current->thread.fpu.fpcsr &= ~(redo_except); in handle_fpu_exception()
Dsys_nds32.c61 current->thread.fpu.UDF_IEX_trap = init_fpuregs.UDF_IEX_trap; in SYSCALL_DEFINE2()
65 old_udf_iex = current->thread.fpu.UDF_IEX_trap; in SYSCALL_DEFINE2()
70 current->thread.fpu.UDF_IEX_trap &= ~act; in SYSCALL_DEFINE2()
73 current->thread.fpu.UDF_IEX_trap |= act; in SYSCALL_DEFINE2()
Dprocess.c189 p->thread.fpu = current->thread.fpu; in copy_thread()
219 int dump_fpu(struct pt_regs *regs, elf_fpregset_t * fpu) in dump_fpu() argument
228 memcpy(fpu, &tsk->thread.fpu, sizeof(*fpu)); in dump_fpu()
DMakefile17 obj-$(CONFIG_FPU) += fpu.o
24 CFLAGS_fpu.o += -mext-fpu-sp -mext-fpu-dp
/kernel/linux/linux-5.10/arch/m68k/kernel/
Dprocess.c215 int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu) in dump_fpu() argument
220 memcpy(fpu->fpcntl, current->thread.fpcntl, 12); in dump_fpu()
221 memcpy(fpu->fpregs, current->thread.fp, 96); in dump_fpu()
226 fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) | in dump_fpu()
227 ((fpu->fpregs[i] & 0x0000ffff) << 16); in dump_fpu()
245 : "m" (fpu->fpcntl[0]), in dump_fpu()
246 "m" (fpu->fpcntl[1]), in dump_fpu()
247 "m" (fpu->fpcntl[2]), in dump_fpu()
248 "m" (fpu->fpregs[0]) in dump_fpu()
253 : "m" (fpu->fpcntl[0]) in dump_fpu()
[all …]
Dsetup_mm.c396 const char *cpu, *mmu, *fpu; in show_cpuinfo() local
426 fpu = "none(soft float)"; in show_cpuinfo()
429 fpu = "68881"; in show_cpuinfo()
431 fpu = "68882"; in show_cpuinfo()
433 fpu = "68040"; in show_cpuinfo()
435 fpu = "68060"; in show_cpuinfo()
437 fpu = "Sun FPA"; in show_cpuinfo()
439 fpu = "ColdFire"; in show_cpuinfo()
441 fpu = "none"; in show_cpuinfo()
469 cpu, mmu, fpu, in show_cpuinfo()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/s390x/
Dresets.c93 struct kvm_fpu fpu; in assert_clear() local
101 vcpu_fpu_get(vm, VCPU_ID, &fpu); in assert_clear()
102 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(vm, VCPU_ID, &fpu); in assert_initial()
163 TEST_ASSERT(!fpu.fpc, "fpc == 0"); in assert_initial()
/kernel/linux/linux-5.10/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
/kernel/linux/linux-5.10/arch/mips/kvm/
Dmips.c668 struct mips_fpu_struct *fpu = &vcpu->arch.fpu; in kvm_mips_get_reg() local
698 v = get_fpr32(&fpu->fpr[idx], 0); in kvm_mips_get_reg()
700 v = get_fpr32(&fpu->fpr[idx & ~1], idx & 1); in kvm_mips_get_reg()
709 v = get_fpr64(&fpu->fpr[idx], 0); in kvm_mips_get_reg()
719 v = fpu->fcr31; in kvm_mips_get_reg()
732 vs[0] = get_fpr64(&fpu->fpr[idx], 0); in kvm_mips_get_reg()
733 vs[1] = get_fpr64(&fpu->fpr[idx], 1); in kvm_mips_get_reg()
736 vs[0] = get_fpr64(&fpu->fpr[idx], 1); in kvm_mips_get_reg()
737 vs[1] = get_fpr64(&fpu->fpr[idx], 0); in kvm_mips_get_reg()
748 v = fpu->msacsr; in kvm_mips_get_reg()
[all …]
/kernel/linux/linux-5.10/arch/csky/kernel/
Dprocess.c74 int dump_fpu(struct pt_regs *regs, struct user_fp *fpu) in dump_fpu() argument
76 memcpy(fpu, &current->thread.user_fp, sizeof(*fpu)); in dump_fpu()
/kernel/linux/linux-5.10/arch/x86/kernel/
Dprocess_32.c162 struct fpu *prev_fpu = &prev->fpu; in __switch_to()
163 struct fpu *next_fpu = &next->fpu; in __switch_to()
/kernel/linux/linux-5.10/arch/mips/include/asm/
Dfpu.h169 tsk->thread.fpu.fcr31 = in lose_fpu_inatomic()
213 memset(&target->thread.fpu.fpr, ~0, sizeof(target->thread.fpu.fpr)); in init_fp_ctx()
248 return tsk->thread.fpu.fpr; in get_fpu_regs()

1234567