/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; 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 …]
|
/linux-6.12.1/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() 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() 187 * Save the fpu, extended register state to the user signal frame. [all …]
|
/linux-6.12.1/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 …]
|
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/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 | elf.c | 14 #include <asm/fpu.h> 22 /* FPU modes */ 30 * struct mode_req - ABI FPU mode requirements 31 * @single: The program being loaded needs an FPU but it will only issue 35 * loaded needs has no FPU dependency at all (i.e. it has no 36 * FPU instructions). 37 * @fr1: The program being loaded depends on FPU being in FR=1 mode. 38 * @frdefault: The program being loaded depends on the default FPU mode. 40 * @fre: The program being loaded depends on FPU with FRE=1. This mode is 212 /* It's time to determine the FPU mode requirements */ in arch_check_elf() [all …]
|
D | fpu-probe.c | 19 #include <asm/fpu.h> 22 #include "fpu-probe.h" 25 * Get the FPU Implementation/Revision. 39 * Check if the CPU has an external FPU. 47 * Determine the FCSR mask for FPU hardware. 76 * supported by FPU hardware. 151 * to support by the FPU emulator according to the IEEE 754 conformance 223 * strict: accept binaries that request a NaN encoding supported by the FPU 226 * relaxed: accept any binaries regardless of whether supported by the FPU 255 * Set the FIR feature flags for the FPU emulator. [all …]
|
/linux-6.12.1/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: 11 * The legacy x87 FPU state format, as saved by FSAVE and 15 u32 cwd; /* FPU Control Word */ 16 u32 swd; /* FPU Status Word */ 17 u32 twd; /* FPU Tag Word */ 18 u32 fip; /* FPU IP Offset */ 19 u32 fcs; /* FPU IP Selector */ 20 u32 foo; /* FPU Operand Pointer Offset */ 21 u32 fos; /* FPU Operand Pointer Selector */ 31 * The legacy fx SSE/MMX FPU state format, as saved by FXSAVE and [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/x86/math-emu/ |
D | README | 2 | wm-FPU-emu an FPU emulator for 80386 and 80486SX microprocessors. | 25 wm-FPU-emu is an FPU emulator for Linux. It is derived from wm-emu387 31 My target FPU for wm-FPU-emu is that described in the Intel486 33 facets of the functioning of the FPU are not well covered in the 40 wm-FPU-emu does not implement all of the behaviour of the 80486 FPU, 56 ----------------------- Internals of wm-FPU-emu ----------------------- 82 emulate each FPU instruction to completion without interruption. 99 ----------------------- Limitations of wm-FPU-emu ----------------------- 101 There are a number of differences between the current wm-FPU-emu 102 (version 2.01) and the 80486 FPU (apart from bugs). The differences [all …]
|
/linux-6.12.1/arch/arc/kernel/ |
D | fpu.c | 3 * fpu.c - save/restore of Floating Point Unit Registers on task switch 9 #include <asm/fpu.h> 14 * To save/restore FPU regs, simplest scheme would use LR/SR insns. 16 * which uses the FPU Exchange insn (DEXCL) to r/w FPU regs. 27 * However we can tweak the read, so that read-out of outgoing task's FPU regs 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/tools/perf/pmu-events/arch/x86/amdzen1/ |
D | floating-point.json | 6 …nd dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 13 …nd dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 20 …nd dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 27 …nd dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 34 …nd dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 40 "BriefDescription": "Total number uOps assigned to all fpu pipes.", 41 …nd dual-pipe uOps dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 48 …operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 55 …operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… 62 …operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how bus… [all …]
|
/linux-6.12.1/arch/m68k/kernel/ |
D | process.c | 184 /* Copy the current fpu state */ in copy_thread() 209 /* Restore the state in case the fpu was busy */ in copy_thread() 217 /* Fill in the fpu structure for a core dump. */ 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() 225 /* Convert internal fpu reg representation 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() 237 /* First dump the fpu context to avoid protocol violation. */ in elf_core_copy_task_fpregs() [all …]
|
/linux-6.12.1/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | dc_fpu.c | 29 #include <linux/fpu.h> 32 * DOC: DC FPU manipulation overview 34 * DC core uses FPU operations in multiple parts of the code, which requires a 38 * summary, in this file, you can find functions related to FPU operation 45 * dc_assert_fp_enabled - Check if FPU protection is enabled 47 * This function tells if the code is already under FPU protection or not. A 48 * function that works as an API for a set of FPU operations can use this 62 * dc_fpu_begin - Enables FPU protection 90 * dc_fpu_end - Disable FPU protection
|
/linux-6.12.1/arch/loongarch/kernel/ |
D | signal.c | 36 #include <asm/fpu.h> 47 /* Make sure we will not lose FPU ownership */ 54 /* Assembly functions to move context to/from the FPU */ 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() [all …]
|
D | kfpu.c | 8 #include <asm/fpu.h> 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()
|
/linux-6.12.1/drivers/gpu/drm/amd/display/dc/dml/dcn10/ |
D | dcn10_fpu.c | 34 * DOC: DCN10 FPU manipulation Overview 36 * The DCN architecture relies on FPU operations, which require special 38 * want to avoid spreading FPU access across multiple files. With this idea in 39 * mind, this file aims to centralize DCN10 functions that require FPU access 42 * 1. Functions that use FPU operations should be isolated in static functions. 43 * 2. The FPU functions should have the noinline attribute to ensure anything 46 * public interface that not uses any FPU reference. 53 * isolate FPU operations in a single place, we must avoid situations where 55 * file. Note that even if we isolate all FPU functions in a single file and 57 * FPU before we call DC_FP_START. Nevertheless, it is the programmer's [all …]
|