/Linux-v6.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-v6.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> 39 * owns the FPU then the memory state has to be synchronized and the 40 * FPU register state preserved. Otherwise fpstate is already in sync. 45 static void sync_fpstate(struct fpu *fpu) in sync_fpstate() argument 47 if (fpu == ¤t->thread.fpu) in sync_fpstate() 48 fpu_sync_fpstate(fpu); in sync_fpstate() 52 * 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() 150 * 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 …]
|
D | xstate.c | 17 #include <asm/fpu/api.h> 18 #include <asm/fpu/regset.h> 19 #include <asm/fpu/signal.h> 20 #include <asm/fpu/xcr.h> 250 "x86/fpu: misordered xstate at %d\n", last_good_offset); in setup_xstate_cache() 261 pr_info("x86/fpu: Supporting XSAVE feature 0x%03Lx: '%s'\n", xstate_mask, feature_name); in print_xstate_feature() 300 pr_info("x86/fpu: xstate_offset[%d]: %4d, xstate_sizes[%d]: %4d\n", in print_xstate_offset_size() 323 * We should never fault when copying from a kernel buffer, and the FPU in os_xrstor_booting() 583 * covered by these checks. Only the size of the buffer for task->fpu 657 * This is the size required for the task->fpu buffer. in get_xsave_compacted_size() [all …]
|
/Linux-v6.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-v6.1/arch/mips/kernel/ |
D | asm-offsets.c | 138 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 …]
|
D | elf.c | 21 /* FPU modes */ 29 * struct mode_req - ABI FPU mode requirements 30 * @single: The program being loaded needs an FPU but it will only issue 34 * loaded needs has no FPU dependency at all (i.e. it has no 35 * FPU instructions). 36 * @fr1: The program being loaded depends on FPU being in FR=1 mode. 37 * @frdefault: The program being loaded depends on the default FPU mode. 39 * @fre: The program being loaded depends on FPU with FRE=1. This mode is 211 /* It's time to determine the FPU mode requirements */ in arch_check_elf() 216 * Check whether the program's and interp's ABIs have a matching FPU 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 218 * strict: accept binaries that request a NaN encoding supported by the FPU 221 * relaxed: accept any binaries regardless of whether supported by the FPU 248 * Set the FIR feature flags for the FPU emulator. [all …]
|
/Linux-v6.1/arch/x86/include/asm/fpu/ |
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); 18 * FPU state switching for scheduling. 28 * If TIF_NEED_FPU_LOAD is cleared then the CPU's FPU registers 29 * are saved in the current thread's FPU register state. 31 * If TIF_NEED_FPU_LOAD is set then CPU's FPU registers may not 32 * hold current()'s FPU registers. It is required to load the 36 * 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 …]
|
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 92 * Load the task FPU state before returning to userspace. 106 extern int fpu__exception_code(struct fpu *fpu, int trap_nr); [all …]
|
/Linux-v6.1/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()
|
/Linux-v6.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-v6.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-v6.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-v6.1/drivers/gpu/drm/amd/display/dc/dml/dcn10/ |
D | dcn10_fpu.c | 32 * DOC: DCN10 FPU manipulation Overview 34 * The DCN architecture relies on FPU operations, which require special 36 * want to avoid spreading FPU access across multiple files. With this idea in 37 * mind, this file aims to centralize DCN10 functions that require FPU access 40 * 1. Functions that use FPU operations should be isolated in static functions. 41 * 2. The FPU functions should have the noinline attribute to ensure anything 44 * public interface that not uses any FPU reference. 51 * isolate FPU operations in a single place, we must avoid situations where 53 * file. Note that even if we isolate all FPU functions in a single file and 55 * FPU before we call DC_FP_START. Nevertheless, it is the programmer's [all …]
|
/Linux-v6.1/arch/m68k/kernel/ |
D | process.c | 182 /* Copy the current fpu state */ in copy_thread() 207 /* Restore the state in case the fpu was busy */ in copy_thread() 215 /* Fill in the fpu structure for a core dump. */ 216 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() 223 /* Convert internal fpu reg representation in dump_fpu() 227 fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) | in dump_fpu() 228 ((fpu->fpregs[i] & 0x0000ffff) << 16); in dump_fpu() 235 /* First dump the fpu context to avoid protocol violation. */ in dump_fpu() [all …]
|
/Linux-v6.1/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | dc_fpu.c | 30 #include <asm/fpu/api.h> 37 * DOC: DC FPU manipulation overview 39 * DC core uses FPU operations in multiple parts of the code, which requires a 43 * summary, in this file, you can find functions related to FPU operation 50 * dc_assert_fp_enabled - Check if FPU protection is enabled 52 * This function tells if the code is already under FPU protection or not. A 53 * function that works as an API for a set of FPU operations can use this 69 * dc_fpu_begin - Enables FPU protection 110 * dc_fpu_end - Disable FPU protection
|
/Linux-v6.1/arch/x86/include/uapi/asm/ |
D | sigcontext.h | 7 * hierarchy of CPU and FPU state, available to user-space (on the stack) when 79 * The FPU state data structure has had to grow to accommodate the extended FPU 105 * The 32-bit FPU frame: 108 /* Legacy FPU environment: */ 118 __u16 magic; /* 0xffff: regular FPU data only */ 119 /* 0x0000: FXSR FPU data */ 121 /* FXSR FPU environment */ 122 __u32 _fxsr_env[6]; /* FXSR FPU env is ignored */ 125 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ 139 * The 64-bit FPU frame. (FXSAVE format and later) [all …]
|
/Linux-v6.1/arch/loongarch/kernel/ |
D | signal.c | 34 #include <asm/fpu.h> 44 /* Make sure we will not lose FPU ownership */ 48 /* Assembly functions to move context to/from the FPU */ 67 struct _ctx_layout fpu; member 90 __put_user(get_fpr64(¤t->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(¤t->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() [all …]
|