Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:puhp_invoke_callback _ Invoke the callbacks for a given state*@cpu: The cpu for which the callback should be invoked*@state: The state to do callbacks for*@bringup: True if the bringup callback should be invoked*@node: For multi-instance, do a single

Proto:static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state, bool bringup, struct hlist_node *node, struct hlist_node **lastp)

Type:int

Parameter:

TypeParameterName
unsigned intcpu
enum cpuhp_statestate
boolbringup
struct hlist_node *node
struct hlist_node **lastp
151  st = per_cpu_ptr( & cpuhp_state, cpu)
152  step = cpuhp_get_step(state)
153  int( * cbm)(unsigned int cpu, struct hlist_node * node)
154  int( * cb)(unsigned int cpu)
157  If fail == state Then
158  fail = CPUHP_INVALID
160  If Not If bringup Then single Else single Then Return 0
163  Return -EAGAIN
166  If Not multi_instance Then
167  WARN_ON_ONCE(lastp && * lastp)
168  cb = If bringup Then single Else single
169  If Not cb Then Return 0
171  trace_cpuhp_enter(cpu, target, state, cb)
172  ret = cb(cpu)
173  trace_cpuhp_exit(cpu, state, state, ret)
174  Return ret
176  cbm = If bringup Then multi Else multi
177  If Not cbm Then Return 0
181  If node Then
182  WARN_ON_ONCE(lastp && * lastp)
183  trace_cpuhp_multi_enter(cpu, target, state, cbm, node)
184  ret = cbm(cpu, node)
185  trace_cpuhp_exit(cpu, state, state, ret)
186  Return ret
190  cnt = 0
192  If lastp && node == lastp Then Break
195  trace_cpuhp_multi_enter(cpu, target, state, cbm, node)
196  ret = cbm(cpu, node)
197  trace_cpuhp_exit(cpu, state, state, ret)
198  If ret Then
199  If Not lastp Then Go to err
202  lastp = node
203  Return ret
205  cnt++
207  If lastp Then * lastp = NULL
209  Return 0
210  err :
212  cbm = If Not bringup Then multi Else multi
213  If Not cbm Then Return ret
217  If Not cnt -- Then Break
220  trace_cpuhp_multi_enter(cpu, target, state, cbm, node)
221  ret = cbm(cpu, node)
222  trace_cpuhp_exit(cpu, state, state, ret)
226  WARN_ON_ONCE(ret)
228  Return ret
Caller
NameDescribe
cpuhp_issue_callCall the startup/teardown function for a step either on the AP or* on the current CPU.