Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:We append the 'struct fpu' to the task_struct:

Proto:static void __init fpu__init_task_struct_size(void)

Type:void

Parameter:Nothing

160  task_size = sizeof(structtask_struct)
166  task_size -= size of state
172  task_size += Size of the FPU context state. All tasks in the system use the* same context size, regardless of what portion they use.* This is inherent to the XSAVE architecture which puts all state* components into a single, continuous memory block:
181  Enforce that 'MEMBER' is the last field of 'TYPE'.* Align the computed size with alignment of the TYPE,* because that's how C aligns structs.(structfpu, XZ decoder state )
182  Enforce that 'MEMBER' is the last field of 'TYPE'.* Align the computed size with alignment of the TYPE,* because that's how C aligns structs.(structthread_struct, fpu)
183  Enforce that 'MEMBER' is the last field of 'TYPE'.* Align the computed size with alignment of the TYPE,* because that's how C aligns structs.(structtask_struct, thread)
185  arch_task_struct_size = task_size
Caller
NameDescribe
fpu__init_systemCalled on the boot CPU once per system bootup, to set up the initial* FPU state that is later cloned into all processes: