Defined in 2 files as a function:
- include/linux/energy_model.h, line 342 (as a function)
- include/linux/energy_model.h, line 401 (as a function)
Referenced in 6 files:
- drivers/powercap/dtpm_cpu.c
- drivers/powercap/dtpm_devfreq.c
- drivers/thermal/cpufreq_cooling.c
- drivers/thermal/devfreq_cooling.c
- kernel/power/em_netlink.c, line 199
- kernel/power/energy_model.c
Smatch caller information:
kernel/power/em_netlink.c __em_nl_get_pd_table() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| DATA_SOURCE | 0 | pd | $1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NO_OVERFLOW_SIMPLE | 0 | pd->nr_perf_states | |
| LOCK2 | rcu_read |
drivers/thermal/cpufreq_cooling.c cpu_freq_to_power() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/cpufreq_cooling.c cpu_power_to_freq() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/cpufreq_cooling.c cpufreq_state2power() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/cpufreq_cooling.c get_level() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| CAPPED_DATA | 0 | pd->em_table | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/cpufreq_cooling.c get_state_freq() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 1-u64max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &cdev->lock |
drivers/powercap/dtpm_cpu.c __dtpm_cpu_setup() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| DATA_SOURCE | 0 | pd | r em_cpu_get |
| BIT_INFO | 0 | pd->flags | 0x0,0xfffffffffffffffb |
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | global &dtpm_lock |
drivers/powercap/dtpm_cpu.c get_pd_power_uw() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| DATA_SOURCE | 0 | pd | r em_cpu_get |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex |
drivers/powercap/dtpm_cpu.c set_pd_power_limit() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| DATA_SOURCE | 0 | pd | r em_cpu_get |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex |
drivers/powercap/dtpm_cpu.c update_pd_power_uw() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| DATA_SOURCE | 0 | pd | r em_cpu_get |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read |
kernel/power/energy_model.c em_adjust_new_capacity() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 1-u64max |
| DATA_SOURCE | 0 | pd | $2 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read |
kernel/power/energy_model.c em_debug_cost_show() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &s->lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/power/energy_model.c em_debug_create_ps() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| PARAM_VALUE | 0 | pd->em_table | 4096-ptr_max |
| PARAM_VALUE | 0 | pd->id | 0-s32max |
| PARAM_VALUE | 0 | pd->max_perf_state | 0-2147483646 |
| PARAM_VALUE | 0 | pd->min_perf_state | 0 |
| PARAM_VALUE | 0 | pd->node.next | 4096-ptr_max |
| PARAM_VALUE | 0 | pd->node.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | pd->nr_perf_states | 1-s32max |
| CAPPED_DATA | 0 | pd->em_table | 1 |
| CAPPED_DATA | 0 | pd->max_perf_state | 1 |
| DATA_SOURCE | 0 | pd | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NO_OVERFLOW_SIMPLE | 0 | pd->nr_perf_states | |
| LOCK2 | global &em_pd_mutex | ||
| LOCK2 | rcu_read |
kernel/power/energy_model.c em_debug_frequency_show() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &s->lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/power/energy_model.c em_debug_inefficiency_show() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &s->lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/power/energy_model.c em_debug_performance_show() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &s->lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/power/energy_model.c em_debug_power_show() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &s->lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct seq_file)->lock |
kernel/power/energy_model.c em_table_dup() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| DATA_SOURCE | 0 | pd | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read |
kernel/power/energy_model.c em_update_performance_limits() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 1-u64max |
| DATA_SOURCE | 0 | pd | $0 |
| LOCK2 | rcu_read |
drivers/thermal/devfreq_cooling.c devfreq_cooling_get_requested_power() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &cdev->lock | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/devfreq_cooling.c devfreq_cooling_get_requested_power() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 4096-ptr_max |
| CAPPED_DATA | 0 | pd->em_table | 1 |
| CAPPED_DATA | 0 | pd->nr_perf_states | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &cdev->lock | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/devfreq_cooling.c devfreq_cooling_power2state() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/devfreq_cooling.c devfreq_cooling_set_cur_state() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | pd | 1-u64max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &cdev->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| TYPE_LOCK | (struct thermal_cooling_device)->lock |
drivers/thermal/devfreq_cooling.c devfreq_cooling_state2power() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/thermal/devfreq_cooling.c get_perf_idx() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| DATA_SOURCE | 0 | pd | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &tz->lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &cdev->lock | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct thermal_zone_device)->lock |
drivers/powercap/dtpm_devfreq.c get_pd_power_uw() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex |
drivers/powercap/dtpm_devfreq.c set_pd_power_limit() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &of->mutex |
drivers/powercap/dtpm_devfreq.c update_pd_power_uw() -> em_perf_state_from_pd()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read |