函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:m_register_perf_domain() - Register the Energy Model of a performance domain*@span : Mask of CPUs in the performance domain*@nr_states : Number of capacity states to register*@cb : Callback functions providing the data of the Energy Model* Create Energy

函数原型:int em_register_perf_domain(cpumask_t *span, unsigned int nr_states, struct em_data_callback *cb)

返回类型:int

参数:

类型参数名称
cpumask_t *span
unsigned intnr_states
struct em_data_callback *cb
202  prev_cap等于0
204  ret等于0
206  如果非span或非nr_states或非cb则返回:负EINVAL
213  mutex_lock( & Mutex serializing the registrations of performance domains and letting* callbacks defined by drivers sleep.)
217  如果READ_ONCE(per_cpu(Mapping of each CPU to the performance domain to which it belongs. , cpu))则
218  ret等于负EEXIST
219  转到:unlock
226  cap等于arch_scale_cpu_capacity(cpu)
227  如果prev_capprev_cap不等于cap
228  打印错误信息("CPUs of %*pbl must have the same capacity\n", cpumask_pr_args - printf args to output a cpumask*@maskp: cpumask to be printed* Can be used to provide arguments for '%*pb[l]' when printing a cpumask.(span))
230  ret等于负EINVAL
231  转到:unlock
233  prev_cap等于cap
237  pd等于em_create_pd(span, nr_states, cb)
238  如果非pd
239  ret等于负EINVAL
240  转到:unlock
249  smp_store_release(per_cpu_ptr( & Mapping of each CPU to the performance domain to which it belongs. , cpu), pd)
252  pr_debug("Created perf domain %*pbl\n", cpumask_pr_args - printf args to output a cpumask*@maskp: cpumask to be printed* Can be used to provide arguments for '%*pb[l]' when printing a cpumask.(span))
253  unlock :
254  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
256  返回:ret