函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\stop_machine.c Create Date:2022-07-27 12:23:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This is the cpu_stop function which stops the CPU.

函数原型:static int multi_cpu_stop(void *data)

返回类型:int

参数:

类型参数名称
void *data
189  msdata等于data
190  curstate等于MULTI_STOP_NONE
191  cpu等于当前cpu ID(), err等于0
200  local_save_flags(flags)
202  如果非active_cpus
203  cpumask等于cpu_online_mask
204  is_active等于cpu恒等于Uniprocessor. Assume all masks are "1".
205  否则
206  cpumask等于active_cpus
207  is_active等于测试CPU信息
211  循环
213  stop_machine_yield(cpumask)
214  newstate等于READ_ONCE(state)
215  如果newstate不等于curstate
216  curstate等于newstate
222  :curstate恒等于MULTI_STOP_RUN
223  如果is_activeerr等于fn(data)
225  退出
226  默认
227  退出
230  否则如果curstate大于MULTI_STOP_PREPARE
238  Let the RCU core know that this CPU has gone through the scheduler,* which is a quiescent state
239 curstate不等于MULTI_STOP_EXIT循环
241  local_irq_restore(flags)
242  返回:err
调用者
名称描述
stop_machine_from_inactive_cpustop_machine_from_inactive_cpu - stop_machine() from inactive CPU*@fn: the function to run*@data: the data ptr for the @fn()*@cpus: the cpus to run the @fn() on (NULL = any online cpu)* This is identical to stop_machine() but can be called from a CPU which