/linux-6.3-rc2/drivers/cpufreq/ |
A D | cpufreq.c | 187 return policy && cpumask_test_cpu(cpu, policy->cpus) ? policy : NULL; in cpufreq_cpu_get_raw() 195 if (!policy || IS_ERR(policy->clk)) { in cpufreq_generic_get() 354 freqs->policy = policy; in cpufreq_notify_transition() 1090 pol = policy->policy; in cpufreq_init_policy() 1132 cpufreq_set_policy(policy, policy->governor, policy->policy); in refresh_frequency_limits() 1608 policy->last_policy = policy->policy; in __cpufreq_offline() 2384 policy->governor->exit(policy); in cpufreq_exit_governor() 2411 policy->governor->limits(policy); in cpufreq_start_governor() 2424 policy->governor->stop(policy); in cpufreq_stop_governor() 2576 policy->min, policy->max); in cpufreq_set_policy() [all …]
|
A D | cpufreq_userspace.c | 49 return sprintf(buf, "%u\n", policy->cur); in show_speed() 60 policy->governor_data = setspeed; in cpufreq_userspace_policy_init() 67 kfree(policy->governor_data); in cpufreq_userspace_policy_exit() 68 policy->governor_data = NULL; in cpufreq_userspace_policy_exit() 76 BUG_ON(!policy->cur); in cpufreq_userspace_policy_start() 81 *setspeed = policy->cur; in cpufreq_userspace_policy_start() 105 policy->cpu, policy->min, policy->max, policy->cur, *setspeed); in cpufreq_userspace_policy_limits() 107 if (policy->max < *setspeed) in cpufreq_userspace_policy_limits() 108 __cpufreq_driver_target(policy, policy->max, CPUFREQ_RELATION_H); in cpufreq_userspace_policy_limits() 109 else if (policy->min > *setspeed) in cpufreq_userspace_policy_limits() [all …]
|
A D | freq_table.c | 54 policy->min = policy->cpuinfo.min_freq = min_freq; in cpufreq_frequency_table_cpuinfo() 55 policy->max = max_freq; in cpufreq_frequency_table_cpuinfo() 61 policy->max = policy->cpuinfo.max_freq = max_freq; in cpufreq_frequency_table_cpuinfo() 63 if (policy->min == ~0) in cpufreq_frequency_table_cpuinfo() 77 policy->min, policy->max, policy->cpu); in cpufreq_frequency_table_verify() 84 if ((freq >= policy->min) && (freq <= policy->max)) { in cpufreq_frequency_table_verify() 99 policy->min, policy->max, policy->cpu); in cpufreq_frequency_table_verify() 111 if (!policy->freq_table) in cpufreq_generic_frequency_table_verify() 114 return cpufreq_frequency_table_verify(policy, policy->freq_table); in cpufreq_generic_frequency_table_verify() 151 if ((freq < policy->min) || (freq > policy->max)) in cpufreq_table_index_unsorted() [all …]
|
A D | sh-cpufreq.c | 33 struct cpufreq_policy *policy; member 45 struct cpufreq_policy *policy = target->policy; in __sh_cpufreq_target() local 46 int cpu = policy->cpu; in __sh_cpufreq_target() 60 if (freq < (policy->min * 1000) || freq > (policy->max * 1000)) in __sh_cpufreq_target() 84 struct cpufreq_target data = { .policy = policy, .freq = target_freq }; in sh_cpufreq_target() 98 cpufreq_verify_within_cpu_limits(policy); in sh_cpufreq_verify() 109 unsigned int cpu = policy->cpu; in sh_cpufreq_cpu_init() 124 policy->freq_table = freq_table; in sh_cpufreq_cpu_init() 129 policy->min = policy->cpuinfo.min_freq = in sh_cpufreq_cpu_init() 131 policy->max = policy->cpuinfo.max_freq = in sh_cpufreq_cpu_init() [all …]
|
A D | gx-suspmod.c | 339 policy->cpu = 0; in cpufreq_gx_verify() 352 policy->min = tmp_freq; in cpufreq_gx_verify() 353 if (policy->min > policy->max) in cpufreq_gx_verify() 354 policy->max = tmp_freq; in cpufreq_gx_verify() 358 policy->max = tmp_freq; in cpufreq_gx_verify() 359 if (policy->max < policy->min) in cpufreq_gx_verify() 360 policy->max = policy->min; in cpufreq_gx_verify() 381 policy->cpu = 0; in cpufreq_gx_target() 402 if (!policy || policy->cpu != 0) in cpufreq_gx_cpu_init() 418 policy->cpu = 0; in cpufreq_gx_cpu_init() [all …]
|
A D | acpi-cpufreq.c | 172 set_boost(policy, val); in store_cpb() 369 struct cpufreq_policy *policy; in get_cur_freq_on_cpu() local 376 if (unlikely(!policy)) in get_cur_freq_on_cpu() 379 data = policy->driver_data; in get_cur_freq_on_cpu() 446 cpumask_of(policy->cpu) : policy->cpus; in acpi_cpufreq_target() 705 policy->driver_data = data; in acpi_cpufreq_cpu_init() 860 policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); in acpi_cpufreq_cpu_init() 887 !(policy_is_shared(policy) && policy->shared_type != CPUFREQ_SHARED_TYPE_ANY); in acpi_cpufreq_cpu_init() 903 policy->driver_data = NULL; in acpi_cpufreq_cpu_init() 916 policy->driver_data = NULL; in acpi_cpufreq_cpu_exit() [all …]
|
A D | amd-pstate.c | 573 policy->max = policy->cpuinfo.max_freq; in amd_pstate_set_boost() 642 policy->min = min_freq; in amd_pstate_cpu_init() 643 policy->max = max_freq; in amd_pstate_cpu_init() 649 policy->cur = policy->cpuinfo.min_freq; in amd_pstate_cpu_init() 979 policy->cur = policy->cpuinfo.min_freq; in amd_pstate_epp_cpu_init() 991 policy->min = policy->cpuinfo.min_freq; in amd_pstate_epp_cpu_init() 992 policy->max = policy->cpuinfo.max_freq; in amd_pstate_epp_cpu_init() 998 policy->policy = CPUFREQ_POLICY_POWERSAVE; in amd_pstate_epp_cpu_init() 1093 policy->cpuinfo.max_freq, policy->max); in amd_pstate_epp_set_policy() 1095 cpudata->policy = policy->policy; in amd_pstate_epp_set_policy() [all …]
|
A D | cppc_cpufreq.c | 384 unsigned int cpu = policy->cpu; in cppc_cpufreq_set_target() 395 freqs.old = policy->cur; in cppc_cpufreq_set_target() 485 int cpu = policy->cpu; in get_perf_level_count() 514 struct cpufreq_policy *policy; in cppc_get_cpu_power() local 581 struct cpufreq_policy *policy; in cppc_get_cpu_cost() local 702 policy->driver_data = NULL; in cppc_cpufreq_put_cpu_data() 757 policy->shared_type); in cppc_cpufreq_cpu_init() 848 cpufreq_cpu_put(policy); in cppc_cpufreq_get_rate() 883 policy->cpuinfo.max_freq = policy->max; in cppc_cpufreq_set_boost() 885 ret = freq_qos_update_request(policy->max_freq_req, policy->max); in cppc_cpufreq_set_boost() [all …]
|
A D | cpufreq_governor.c | 137 for_each_cpu(j, policy->cpus) { in dbs_update() 235 struct cpufreq_policy *policy; in dbs_work_handler() local 239 policy = policy_dbs->policy; in dbs_work_handler() 240 gov = dbs_governor_of(policy); in dbs_work_handler() 325 struct cpufreq_policy *policy = policy_dbs->policy; in gov_set_update_util() local 343 for_each_cpu(i, policy->cpus) in gov_clear_update_util() 360 policy_dbs->policy = policy; in alloc_policy_dbs_info() 408 if (policy->governor_data) in cpufreq_dbs_governor_init() 472 policy->governor_data = NULL; in cpufreq_dbs_governor_init() 519 if (!policy->cur) in cpufreq_dbs_governor_start() [all …]
|
A D | longrun.c | 42 policy->policy = CPUFREQ_POLICY_PERFORMANCE; in longrun_get_policy() 44 policy->policy = CPUFREQ_POLICY_POWERSAVE; in longrun_get_policy() 53 policy->min = policy->max = longrun_high_freq; in longrun_get_policy() 55 policy->min = longrun_low_freq + msr_lo * in longrun_get_policy() 60 policy->cpu = 0; in longrun_get_policy() 76 if (!policy) in longrun_set_policy() 97 switch (policy->policy) { in longrun_set_policy() 127 if (!policy) in longrun_verify_policy() 130 policy->cpu = 0; in longrun_verify_policy() 257 if (policy->cpu != 0) in longrun_cpu_init() [all …]
|
A D | ppc_cbe_cpufreq.c | 62 cpu = of_get_cpu_node(policy->cpu, NULL); in cbe_cpufreq_cpu_init() 72 if (!cbe_get_cpu_pmd_regs(policy->cpu) || in cbe_cpufreq_cpu_init() 73 !cbe_get_cpu_mic_tm_regs(policy->cpu)) { in cbe_cpufreq_cpu_init() 100 policy->cpuinfo.transition_latency = 25000; in cbe_cpufreq_cpu_init() 105 policy->cur = cbe_freqs[cur_pmode].frequency; in cbe_cpufreq_cpu_init() 108 cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); in cbe_cpufreq_cpu_init() 111 policy->freq_table = cbe_freqs; in cbe_cpufreq_cpu_init() 112 cbe_cpufreq_pmi_policy_init(policy); in cbe_cpufreq_cpu_init() 118 cbe_cpufreq_pmi_policy_exit(policy); in cbe_cpufreq_cpu_exit() 127 policy->cpu, in cbe_cpufreq_target() [all …]
|
A D | mediatek-cpufreq-hw.c | 58 struct cpufreq_policy *policy; in mtk_cpufreq_get_cpu_power() local 62 if (!policy) in mtk_cpufreq_get_cpu_power() 65 data = policy->driver_data; in mtk_cpufreq_get_cpu_power() 94 struct cpufreq_policy *policy; in mtk_cpufreq_hw_get() local 97 policy = cpufreq_cpu_get_raw(cpu); in mtk_cpufreq_hw_get() 98 if (!policy) in mtk_cpufreq_hw_get() 101 data = policy->driver_data; in mtk_cpufreq_hw_get() 174 policy->cpus, &args); in mtk_cpu_resources_init() 212 policy->driver_data = data; in mtk_cpu_resources_init() 235 data = policy->driver_data; in mtk_cpufreq_hw_cpu_init() [all …]
|
A D | cpufreq_ondemand.c | 124 else if (policy->cur == policy->max) in dbs_freq_increase() 149 if (policy->cur < policy->max) in od_update() 151 dbs_freq_increase(policy, policy->max); in od_update() 156 min_f = policy->cpuinfo.min_freq; in od_update() 157 max_f = policy->cpuinfo.max_freq; in od_update() 191 od_update(policy); in od_dbs_update() 396 ondemand_powersave_bias_init(policy); in od_start() 429 struct cpufreq_policy *policy; in od_set_powersave_bias() local 437 policy = cpufreq_cpu_get_raw(cpu); in od_set_powersave_bias() 438 if (!policy || policy->governor != &CPU_FREQ_GOV_ONDEMAND) in od_set_powersave_bias() [all …]
|
A D | apple-soc-cpufreq.c | 107 struct apple_cpu_priv *priv = policy->driver_data; in apple_soc_cpufreq_get_rate() 164 if (apple_soc_cpufreq_set_target(policy, policy->cached_resolved_idx) < 0) in apple_soc_cpufreq_fast_switch() 167 return policy->freq_table[policy->cached_resolved_idx].frequency; in apple_soc_cpufreq_fast_switch() 180 policy->cpus, &args); in apple_soc_cpufreq_find_cluster() 214 cpu_dev = get_cpu_device(policy->cpu); in apple_soc_cpufreq_init() 273 policy->driver_data = priv; in apple_soc_cpufreq_init() 274 policy->freq_table = freq_table; in apple_soc_cpufreq_init() 281 policy->dvfs_possible_from_any_cpu = true; in apple_soc_cpufreq_init() 282 policy->fast_switch_possible = true; in apple_soc_cpufreq_init() 283 policy->suspend_freq = freq_table[0].frequency; in apple_soc_cpufreq_init() [all …]
|
A D | qcom-cpufreq-hw.c | 57 struct cpufreq_policy *policy; member 155 if (!policy) in qcom_cpufreq_get_freq() 158 data = policy->driver_data; in qcom_cpufreq_get_freq() 173 if (!policy) in qcom_cpufreq_hw_get() 176 data = policy->driver_data; in qcom_cpufreq_hw_get() 297 policy->freq_table = table; in qcom_cpufreq_hw_read_lut() 328 struct cpufreq_policy *policy = data->policy; in qcom_lmh_dcvs_notify() local 455 data->policy = policy; in qcom_cpufreq_hw_lmh_init() 537 policy->cpu); in qcom_cpufreq_hw_cpu_init() 565 policy->driver_data = data; in qcom_cpufreq_hw_cpu_init() [all …]
|
A D | amd_freq_sensitivity.c | 51 if (!policy->freq_table) in amd_powersave_bias_target() 63 freq_next = policy->cur; in amd_powersave_bias_target() 72 freq_next = policy->cur; in amd_powersave_bias_target() 83 if (data->freq_prev == policy->cur) in amd_powersave_bias_target() 84 freq_next = policy->cur; in amd_powersave_bias_target() 86 if (freq_next > policy->cur) in amd_powersave_bias_target() 87 freq_next = policy->cur; in amd_powersave_bias_target() 88 else if (freq_next < policy->cur) in amd_powersave_bias_target() 89 freq_next = policy->min; in amd_powersave_bias_target() 93 index = cpufreq_table_find_index_h(policy, in amd_powersave_bias_target() [all …]
|
/linux-6.3-rc2/fs/crypto/ |
A D | policy.c | 554 if (copy_to_user(arg, &policy, sizeof(policy.v1))) in fscrypt_ioctl_get_policy() 572 BUILD_BUG_ON(sizeof(arg.policy) != sizeof(*policy)); in fscrypt_ioctl_get_policy_ex() 786 policy = kzalloc(sizeof(*policy), GFP_KERNEL); in fscrypt_parse_test_dummy_encryption() 787 if (!policy) in fscrypt_parse_test_dummy_encryption() 810 if (fscrypt_policies_equal(policy, dummy_policy->policy)) in fscrypt_parse_test_dummy_encryption() 816 dummy_policy->policy = policy; in fscrypt_parse_test_dummy_encryption() 817 policy = NULL; in fscrypt_parse_test_dummy_encryption() 835 if (!p1->policy && !p2->policy) in fscrypt_dummy_policies_equal() 837 if (!p1->policy || !p2->policy) in fscrypt_dummy_policies_equal() 839 return fscrypt_policies_equal(p1->policy, p2->policy); in fscrypt_dummy_policies_equal() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | cpufreq.h | 468 policy->min = min; in cpufreq_verify_within_limits() 475 if (policy->min > policy->max) in cpufreq_verify_within_limits() 476 policy->min = policy->max; in cpufreq_verify_within_limits() 483 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, in cpufreq_verify_within_cpu_limits() 645 if (policy->max < policy->cur) in cpufreq_policy_apply_limits() 646 __cpufreq_driver_target(policy, policy->max, in cpufreq_policy_apply_limits() 648 else if (policy->min > policy->cur) in cpufreq_policy_apply_limits() 649 __cpufreq_driver_target(policy, policy->min, in cpufreq_policy_apply_limits() 863 target_freq = clamp_val(target_freq, policy->min, policy->max); in cpufreq_table_find_index_l() 931 target_freq = clamp_val(target_freq, policy->min, policy->max); in cpufreq_table_find_index_h() [all …]
|
/linux-6.3-rc2/Documentation/translations/zh_CN/cpu-freq/ |
A D | cpu-drivers.rst | 58 .init - 一个指向per-policy初始化函数的指针。 81 .suspend - 一个指向per-policy暂停函数的指针,该函数在关中断且在该策略的调节器停止 87 .ready - 一个指向per-policy准备函数的指针,该函数在策略完全初始化之后被调用。 103 *policy`` 作为参数。现在该怎么做呢? 124 |policy->policy and, if necessary, | cpufreq_driver.verify和下面函数 | 129 |policy->cpus | 该policy通过DVFS框架影响的全部CPU | 148 您需要确保至少有一个有效频率(或工作范围)在 policy->min 和 policy->max 范围内。如果有必 149 要,先增大policy->max,只有在没有解决方案的情况下,才减小policy->min。 180 - policy->min <= new_freq <= policy->max (这必须是有效的!!!) 201 率切换的下限设置为policy->min,上限设置为policy->max,如果支持的话,当policy->policy为 [all …]
|
/linux-6.3-rc2/Documentation/translations/zh_TW/cpu-freq/ |
A D | cpu-drivers.rst | 55 .init - 一個指向per-policy初始化函數的指針。 100 *policy`` 作爲參數。現在該怎麼做呢? 107 |policy->cpuinfo.min_freq 和 | | 120 |policy->min, | | 121 |policy->max, | | 122 |policy->policy and, if necessary, | | 148 您需要確保至少有一個有效頻率(或工作範圍)在 policy->min 和 policy->max 範圍內。如果有必 149 要,先增加policy->max,只有在沒有辦法的情況下,才減少policy->min。 179 - policy->min <= new_freq <= policy->max (這必須是有效的!!!) 200 率切換的下限設置爲policy->min,上限設置爲policy->max,如果支持的話,當policy->policy爲 [all …]
|
/linux-6.3-rc2/drivers/hwtracing/stm/ |
A D | policy.c | 235 policy = parent_node->policy; in stp_policy_node_make() 238 if (!policy->stm) in stp_policy_node_make() 256 policy_node->policy = policy; in stp_policy_node_make() 295 (policy && policy->stm) ? in stp_policy_device_show() 311 (policy && policy->stm) ? in stp_policy_protocol_show() 340 stm->policy = NULL; in stp_policy_unbind() 341 policy->stm = NULL; in stp_policy_unbind() 364 kfree(policy); in stp_policy_release() 435 if (stm->policy) { in stp_policy_make() 440 stm->policy = kzalloc(sizeof(*stm->policy), GFP_KERNEL); in stp_policy_make() [all …]
|
/linux-6.3-rc2/drivers/thermal/ |
A D | cpufreq_cooling.c | 75 struct cpufreq_policy *policy; member 225 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_get_requested_power() local 302 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_power2state() local 316 struct cpufreq_policy *policy; in em_is_sane() local 322 policy = cpufreq_cdev->policy; in em_is_sane() 375 struct cpufreq_policy *policy; in get_state_freq() local 387 policy = cpufreq_cdev->policy; in get_state_freq() 493 struct cpufreq_policy *policy, in __cpufreq_cooling_register() argument 504 if (IS_ERR_OR_NULL(policy)) { in __cpufreq_cooling_register() 526 cpufreq_cdev->policy = policy; in __cpufreq_cooling_register() [all …]
|
/linux-6.3-rc2/kernel/sched/ |
A D | cpufreq_schedutil.c | 17 struct cpufreq_policy *policy; member 142 struct cpufreq_policy *policy = sg_policy->policy; in get_next_freq() local 144 policy->cpuinfo.max_freq : policy->cur; in get_next_freq() 417 struct cpufreq_policy *policy = sg_policy->policy; in sugov_next_freq_shared() local 423 for_each_cpu(j, policy->cpus) { in sugov_next_freq_shared() 567 sg_policy->policy = policy; in sugov_policy_alloc() 594 struct cpufreq_policy *policy = sg_policy->policy; in sugov_kthread_create() local 665 if (policy->governor_data) in sugov_init() 717 policy->governor_data = NULL; in sugov_init() 743 policy->governor_data = NULL; in sugov_exit() [all …]
|
/linux-6.3-rc2/arch/powerpc/platforms/cell/ |
A D | cpufreq_spudemand.c | 25 struct cpufreq_policy *policy; member 36 cpu = info->policy->cpu; in calc_freq() 43 return info->policy->max * info->busy_spus / FIXED_1; in calc_freq() 55 BUG_ON(info->policy == NULL); in spu_gov_work() 78 unsigned int cpu = policy->cpu; in spu_gov_start() 88 if (!policy->cur) { in spu_gov_start() 94 for_each_cpu(i, policy->cpus) { in spu_gov_start() 96 affected_info->policy = policy; in spu_gov_start() 109 unsigned int cpu = policy->cpu; in spu_gov_stop() 117 for_each_cpu (i, policy->cpus) { in spu_gov_stop() [all …]
|
/linux-6.3-rc2/net/netlink/ |
A D | policy.c | 22 const struct nla_policy *policy; member 34 if (!policy || !maxtype) in add_policy() 38 if (state->policies[i].policy == policy && in add_policy() 43 state->policies[i].policy = policy; in add_policy() 58 state->policies[state->n_alloc].policy = policy; in add_policy() 91 if (state->policies[i].policy == policy && in netlink_policy_dump_get_policy_idx() 155 policy = state->policies[policy_idx].policy; in netlink_policy_dump_add_policy() 165 policy[type].len); in netlink_policy_dump_add_policy() 425 struct nlattr *policy; in netlink_policy_dump_write() local 435 if (!policy) in netlink_policy_dump_write() [all …]
|