| /kernel/linux/linux-6.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; 29 TP_printk("x86/fpu: %p load: %d xfeatures: %llx xcomp_bv: %llx", 30 __entry->fpu, 38 TP_PROTO(struct fpu *fpu), 39 TP_ARGS(fpu) [all …]
|
| /kernel/linux/linux-5.10/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->state.xsave.header.xfeatures; 26 __entry->xcomp_bv = fpu->state.xsave.header.xcomp_bv; 29 TP_printk("x86/fpu: %p load: %d xfeatures: %llx xcomp_bv: %llx", 30 __entry->fpu, 38 TP_PROTO(struct fpu *fpu), 39 TP_ARGS(fpu) [all …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/fpu/ |
| D | core.c | 6 * General FPU state handling cleanups 9 #include <asm/fpu/internal.h> 10 #include <asm/fpu/regset.h> 11 #include <asm/fpu/signal.h> 12 #include <asm/fpu/types.h> 20 #include <asm/trace/fpu.h> 23 * Represents the initial FPU state. It's mostly (but not completely) zeroes, 24 * depending on the FPU hardware format: 28 /* Track in-kernel FPU usage */ 32 * Track which context is using the FPU on the CPU: [all …]
|
| D | regset.c | 3 * FPU register's regset abstraction, for ptrace, core dumps, etc. 5 #include <asm/fpu/internal.h> 6 #include <asm/fpu/signal.h> 7 #include <asm/fpu/regset.h> 8 #include <asm/fpu/xstate.h> 32 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 [all …]
|
| D | signal.c | 3 * FPU signal frame handling routines. 10 #include <asm/fpu/internal.h> 11 #include <asm/fpu/signal.h> 12 #include <asm/fpu/regset.h> 13 #include <asm/fpu/xstate.h> 16 #include <asm/trace/fpu.h> 61 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() 144 * Save the fpu, extended register state to the user signal frame. 154 * If this fails then do the slow path where the FPU state is first saved to [all …]
|
| D | init.c | 3 * x86 FPU boot time init code: 5 #include <asm/fpu/internal.h> 37 fpstate_init_soft(¤t->thread.fpu.state.soft); in fpu__init_cpu_generic() 44 * Enable all supported FPU features. Called when a CPU is brought online: 65 pr_info("x86/fpu: Probing for FPU: FSW=0x%04hx FCW=0x%04hx\n", fsw, fcw); in fpu__probe_without_cpuid() 82 pr_emerg("x86/fpu: Giving up, no FPU found and no math emulation present\n"); in fpu__init_system_early_generic() 90 * Boot time FPU feature detection code: 119 * Once per bootup FPU initialization sequences that will run on most x86 CPUs: 124 * Set up the legacy init FPU context. (xstate init might overwrite this in fpu__init_system_generic() 133 * Size of the FPU context state. All tasks in the system use the [all …]
|
| /kernel/linux/linux-6.6/arch/x86/kernel/fpu/ |
| D | context.h | 5 #include <asm/fpu/xstate.h> 6 #include <asm/trace/fpu.h> 8 /* Functions related to FPU context tracking */ 11 * The in-register FPU state for an FPU context on a CPU is assumed to be 12 * valid if the fpu->last_cpu matches the CPU, and the fpu_fpregs_owner_ctx 13 * matches the FPU. 15 * If the FPU register state is valid, the kernel can skip restoring the 16 * FPU state from memory. 18 * Any code that clobbers the FPU registers or updates the in-memory 19 * FPU state for a task MUST let the rest of the kernel know that the [all …]
|
| D | core.c | 6 * General FPU state handling cleanups 9 #include <asm/fpu/api.h> 10 #include <asm/fpu/regset.h> 11 #include <asm/fpu/sched.h> 12 #include <asm/fpu/signal.h> 13 #include <asm/fpu/types.h> 29 #include <asm/trace/fpu.h> 36 /* The FPU state configuration data for kernel and user space */ 41 * Represents the initial FPU state. It's mostly (but not completely) zeroes, 42 * depending on the FPU hardware format: [all …]
|
| D | regset.c | 3 * FPU register's regset abstraction, for ptrace, core dumps, etc. 8 #include <asm/fpu/api.h> 9 #include <asm/fpu/signal.h> 10 #include <asm/fpu/regset.h> 40 * owns the FPU then the memory state has to be synchronized and the 41 * FPU register state preserved. Otherwise fpstate is already in sync. 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() 53 * Invalidate cached FPU registers before modifying the stopped target [all …]
|
| D | init.c | 3 * x86 FPU boot time init code: 5 #include <asm/fpu/api.h> 41 fpstate_init_soft(¤t->thread.fpu.fpstate->regs.soft); in fpu__init_cpu_generic() 48 * Enable all supported FPU features. Called when a CPU is brought online: 69 pr_info("x86/fpu: Probing for FPU: FSW=0x%04hx FCW=0x%04hx\n", fsw, fcw); in fpu__probe_without_cpuid() 86 pr_emerg("x86/fpu: Giving up, no FPU found and no math emulation present\n"); in fpu__init_system_early_generic() 94 * Boot time FPU feature detection code: 123 * Once per bootup FPU initialization sequences that will run on most x86 CPUs: 128 * Set up the legacy init FPU context. Will be updated when the in fpu__init_system_generic() 147 * We append the 'struct fpu' to the task_struct: [all …]
|
| D | signal.c | 3 * FPU signal frame handling routines. 10 #include <asm/fpu/signal.h> 11 #include <asm/fpu/regset.h> 12 #include <asm/fpu/xstate.h> 16 #include <asm/trace/fpu.h> 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() 170 * Save the fpu, extended register state to the user signal frame. [all …]
|
| /kernel/linux/linux-6.6/arch/sparc/kernel/ |
| D | cpu.c | 60 #define FPU(ver, _name) \ macro 75 FPU(0, "Fujitsu MB86910 or Weitek WTL1164/5"), 76 FPU(1, "Fujitsu MB86911 or Weitek WTL1164/5 or LSI L64831"), 77 FPU(2, "LSI Logic L64802 or Texas Instruments ACT8847"), 79 FPU(3, "Weitek WTL3170/2"), 81 FPU(4, "Lsi Logic/Meiko L64804 or compatible"), 82 FPU(-1, NULL) 99 FPU(0, "ROSS HyperSparc combined IU/FPU"), 100 FPU(1, "Lsi Logic L64814"), 101 FPU(2, "Texas Instruments TMS390-C602A"), [all …]
|
| 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 …]
|
| /kernel/linux/linux-5.10/arch/sparc/kernel/ |
| D | cpu.c | 60 #define FPU(ver, _name) \ macro 75 FPU(0, "Fujitsu MB86910 or Weitek WTL1164/5"), 76 FPU(1, "Fujitsu MB86911 or Weitek WTL1164/5 or LSI L64831"), 77 FPU(2, "LSI Logic L64802 or Texas Instruments ACT8847"), 79 FPU(3, "Weitek WTL3170/2"), 81 FPU(4, "Lsi Logic/Meiko L64804 or compatible"), 82 FPU(-1, NULL) 99 FPU(0, "ROSS HyperSparc combined IU/FPU"), 100 FPU(1, "Lsi Logic L64814"), 101 FPU(2, "Texas Instruments TMS390-C602A"), [all …]
|
| 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 …]
|
| /kernel/linux/linux-5.10/arch/mips/kernel/ |
| D | asm-offsets.c | 140 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 …]
|
| /kernel/linux/linux-5.10/arch/x86/include/asm/fpu/ |
| D | internal.h | 6 * General FPU state handling cleanups 20 #include <asm/fpu/api.h> 21 #include <asm/fpu/xstate.h> 22 #include <asm/fpu/xcr.h> 24 #include <asm/trace/fpu.h> 27 * High level FPU state handling functions: 29 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); [all …]
|
| D | types.h | 3 * FPU data structures: 9 * The legacy x87 FPU state format, as saved by FSAVE and 13 u32 cwd; /* FPU Control Word */ 14 u32 swd; /* FPU Status Word */ 15 u32 twd; /* FPU Tag Word */ 16 u32 fip; /* FPU IP Offset */ 17 u32 fcs; /* FPU IP Selector */ 18 u32 foo; /* FPU Operand Pointer Offset */ 19 u32 fos; /* FPU Operand Pointer Selector */ 29 * The legacy fx SSE/MMX FPU state format, as saved by FXSAVE and [all …]
|
| /kernel/linux/linux-6.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 …]
|
| /kernel/linux/linux-6.6/arch/x86/include/asm/fpu/ |
| D | api.h | 6 * General FPU state handling cleanups 15 #include <asm/fpu/types.h> 18 * Use kernel_fpu_begin/end() if you intend to use FPU in kernel context. It 21 * If you intend to use the FPU in irq/softirq you need to check first with 25 /* Kernel FPU states to initialize in kernel_fpu_begin_mask() */ 53 * Use fpregs_lock() while editing CPU's FPU registers or fpu->fpstate. 54 * A context switch will (and softirq might) save CPU's FPU registers to 55 * fpu->fpstate.regs and set TIF_NEED_FPU_LOAD leaving CPU's FPU registers in 86 * FPU state gets lazily restored before returning to userspace. So when in the 87 * kernel, the valid FPU state may be kept in the buffer. This function will force [all …]
|
| D | sched.h | 8 #include <asm/fpu/types.h> 10 #include <asm/trace/fpu.h> 12 extern void save_fpregs_to_fpstate(struct fpu *fpu); 13 extern void fpu__drop(struct fpu *fpu); 19 * FPU state switching for scheduling. 29 * If TIF_NEED_FPU_LOAD is cleared then the CPU's FPU registers 30 * are saved in the current thread's FPU register state. 32 * If TIF_NEED_FPU_LOAD is set then CPU's FPU registers may not 33 * hold current()'s FPU registers. It is required to load the 37 * The FPU context is only stored/restored for a user task and [all …]
|
| D | types.h | 3 * FPU data structures: 9 * The legacy x87 FPU state format, as saved by FSAVE and 13 u32 cwd; /* FPU Control Word */ 14 u32 swd; /* FPU Status Word */ 15 u32 twd; /* FPU Tag Word */ 16 u32 fip; /* FPU IP Offset */ 17 u32 fcs; /* FPU IP Selector */ 18 u32 foo; /* FPU Operand Pointer Offset */ 19 u32 fos; /* FPU Operand Pointer Selector */ 29 * The legacy fx SSE/MMX FPU state format, as saved by FXSAVE and [all …]
|
| /kernel/linux/linux-6.6/arch/s390/include/asm/fpu/ |
| D | internal.h | 3 * FPU state and register content conversion primitives 14 #include <asm/fpu/types.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()
|
| /kernel/linux/linux-5.10/arch/s390/include/asm/fpu/ |
| D | internal.h | 3 * FPU state and register content conversion primitives 14 #include <asm/fpu/types.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()
|
| /kernel/linux/linux-6.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 …]
|