Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\core.c Create Date:2022-07-28 07:49:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Clear FPU registers by setting them up from* the init fpstate:

Proto:static inline void copy_init_fpstate_to_fpregs(void)

Type:void

Parameter:Nothing

299  Use fpregs_lock() while editing CPU's FPU registers or fpu->state.* A context switch will (and softirq might) save CPU's FPU registers to* fpu->state and set TIF_NEED_FPU_LOAD leaving CPU's FPU registers in* a random state.
301  If use_xsave() Then Restore processor xstate from xsave area.
303  Else if static_cpu_has(FXSAVE/FXRSTOR, CR4.OSFXSR ) Then copy_kernel_to_fxregs( & fxsave)
305  Else copy_kernel_to_fregs( & fsave)
308  If boot_cpu_has(OS Protection Keys Enable ) Then copy_init_pkru_to_fpregs()
311  fpregs_mark_activate()
312  fpregs_unlock()
Caller
NameDescribe
fpu__clearClear the FPU state back to init state.* Called by sys_execve(), by the signal handler code and by various* error paths.