Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cpu.c Create Date:2022-07-28 09:00:52
Last Modify:2020-03-18 13:00:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cpuhp_store_callbacks

Proto:static int cpuhp_store_callbacks(enum cpuhp_state state, const char *name, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu), bool multi_instance)

Type:int

Parameter:

TypeParameterName
enum cpuhp_statestate
const char *name
int (*startup
int (*teardown
boolmulti_instance
1582  ret = 0
1593  If name && ( state == CPUHP_AP_ONLINE_DYN || state == CPUHP_BP_PREPARE_DYN ) Then
1595  ret = Returns a free for dynamic slot assignment of the Online state. The states* are protected by the cpuhp_slot_states mutex and an empty slot is identified* by having no name assigned.
1596  If ret < 0 Then Return ret
1598  state = ret
1600  sp = cpuhp_get_step(state)
1601  If name && name Then Return -EBUSY
1604  single = startup
1605  single = teardown
1606  name = name
1607  multi_instance = multi_instance
1608  INIT_HLIST_HEAD( & list)
1609  Return ret
Caller
NameDescribe
__cpuhp_setup_state_cpuslocked__cpuhp_setup_state_cpuslocked - Setup the callbacks for an hotplug machine state*@state: The state to setup*@invoke: If true, the startup function is invoked for cpus where* cpu state >= @state*@startup: startup callback function*@teardown: teardown
__cpuhp_remove_state_cpuslocked__cpuhp_remove_state_cpuslocked - Remove the callbacks for an hotplug machine state*@state: The state to remove*@invoke: If true, the teardown function is invoked for cpus where* cpu state >= @state