/Linux-v4.19/drivers/cpufreq/ |
D | cpufreq.c | 36 static inline bool policy_is_inactive(struct cpufreq_policy *policy) in policy_is_inactive() argument 38 return cpumask_empty(policy->cpus); in policy_is_inactive() 77 static unsigned int __cpufreq_get(struct cpufreq_policy *policy); 78 static int cpufreq_init_governor(struct cpufreq_policy *policy); 79 static void cpufreq_exit_governor(struct cpufreq_policy *policy); 80 static int cpufreq_start_governor(struct cpufreq_policy *policy); 81 static void cpufreq_stop_governor(struct cpufreq_policy *policy); 82 static void cpufreq_governor_limits(struct cpufreq_policy *policy); 111 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) in get_governor_parent_kobj() argument 114 return &policy->kobj; in get_governor_parent_kobj() [all …]
|
D | cpufreq_userspace.c | 32 static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) in cpufreq_set() argument 35 unsigned int *setspeed = policy->governor_data; in cpufreq_set() 37 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set() 40 if (!per_cpu(cpu_is_managed, policy->cpu)) in cpufreq_set() 45 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L); in cpufreq_set() 51 static ssize_t show_speed(struct cpufreq_policy *policy, char *buf) in show_speed() argument 53 return sprintf(buf, "%u\n", policy->cur); in show_speed() 56 static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy) in cpufreq_userspace_policy_init() argument 64 policy->governor_data = setspeed; in cpufreq_userspace_policy_init() 68 static void cpufreq_userspace_policy_exit(struct cpufreq_policy *policy) in cpufreq_userspace_policy_exit() argument [all …]
|
D | freq_table.c | 21 bool policy_has_boost_freq(struct cpufreq_policy *policy) in policy_has_boost_freq() argument 23 struct cpufreq_frequency_table *pos, *table = policy->freq_table; in policy_has_boost_freq() 36 int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, in cpufreq_frequency_table_cpuinfo() argument 58 policy->min = policy->cpuinfo.min_freq = min_freq; in cpufreq_frequency_table_cpuinfo() 59 policy->max = policy->cpuinfo.max_freq = max_freq; in cpufreq_frequency_table_cpuinfo() 61 if (policy->min == ~0) in cpufreq_frequency_table_cpuinfo() 67 int cpufreq_frequency_table_verify(struct cpufreq_policy *policy, in cpufreq_frequency_table_verify() argument 75 policy->min, policy->max, policy->cpu); in cpufreq_frequency_table_verify() 77 cpufreq_verify_within_cpu_limits(policy); in cpufreq_frequency_table_verify() 82 if ((freq >= policy->min) && (freq <= policy->max)) { in cpufreq_frequency_table_verify() [all …]
|
D | sh-cpufreq.c | 34 struct cpufreq_policy *policy; member 46 struct cpufreq_policy *policy = target->policy; in __sh_cpufreq_target() local 47 int cpu = policy->cpu; in __sh_cpufreq_target() 61 if (freq < (policy->min * 1000) || freq > (policy->max * 1000)) in __sh_cpufreq_target() 70 cpufreq_freq_transition_begin(target->policy, &freqs); in __sh_cpufreq_target() 72 cpufreq_freq_transition_end(target->policy, &freqs, 0); in __sh_cpufreq_target() 81 static int sh_cpufreq_target(struct cpufreq_policy *policy, in sh_cpufreq_target() argument 85 struct cpufreq_target data = { .policy = policy, .freq = target_freq }; in sh_cpufreq_target() 87 return work_on_cpu(policy->cpu, __sh_cpufreq_target, &data); in sh_cpufreq_target() 90 static int sh_cpufreq_verify(struct cpufreq_policy *policy) in sh_cpufreq_verify() argument [all …]
|
D | longrun.c | 36 static void longrun_get_policy(struct cpufreq_policy *policy) in longrun_get_policy() argument 43 policy->policy = CPUFREQ_POLICY_PERFORMANCE; in longrun_get_policy() 45 policy->policy = CPUFREQ_POLICY_POWERSAVE; in longrun_get_policy() 54 policy->min = policy->max = longrun_high_freq; in longrun_get_policy() 56 policy->min = longrun_low_freq + msr_lo * in longrun_get_policy() 58 policy->max = longrun_low_freq + msr_hi * in longrun_get_policy() 61 policy->cpu = 0; in longrun_get_policy() 72 static int longrun_set_policy(struct cpufreq_policy *policy) in longrun_set_policy() argument 77 if (!policy) in longrun_set_policy() 84 pctg_lo = (policy->min - longrun_low_freq) / in longrun_set_policy() [all …]
|
D | unicore2-cpufreq.c | 28 static int ucv2_verify_speed(struct cpufreq_policy *policy) in ucv2_verify_speed() argument 30 if (policy->cpu) in ucv2_verify_speed() 33 cpufreq_verify_within_cpu_limits(policy); in ucv2_verify_speed() 37 static int ucv2_target(struct cpufreq_policy *policy, in ucv2_target() argument 44 freqs.old = policy->cur; in ucv2_target() 47 cpufreq_freq_transition_begin(policy, &freqs); in ucv2_target() 48 ret = clk_set_rate(policy->clk, target_freq * 1000); in ucv2_target() 49 cpufreq_freq_transition_end(policy, &freqs, ret); in ucv2_target() 54 static int __init ucv2_cpu_init(struct cpufreq_policy *policy) in ucv2_cpu_init() argument 56 if (policy->cpu != 0) in ucv2_cpu_init() [all …]
|
D | acpi-cpufreq.c | 152 static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf) in show_freqdomain_cpus() argument 154 struct acpi_cpufreq_data *data = policy->driver_data; in show_freqdomain_cpus() 165 static ssize_t store_cpb(struct cpufreq_policy *policy, const char *buf, in store_cpb() argument 183 static ssize_t show_cpb(struct cpufreq_policy *policy, char *buf) in show_cpb() argument 205 static unsigned extract_io(struct cpufreq_policy *policy, u32 value) in extract_io() argument 207 struct acpi_cpufreq_data *data = policy->driver_data; in extract_io() 215 return policy->freq_table[i].frequency; in extract_io() 220 static unsigned extract_msr(struct cpufreq_policy *policy, u32 msr) in extract_msr() argument 222 struct acpi_cpufreq_data *data = policy->driver_data; in extract_msr() 233 cpufreq_for_each_entry(pos, policy->freq_table) in extract_msr() [all …]
|
D | gx-suspmod.c | 254 static void gx_set_cpuspeed(struct cpufreq_policy *policy, unsigned int khz) in gx_set_cpuspeed() argument 268 cpufreq_freq_transition_begin(policy, &freqs); in gx_set_cpuspeed() 317 cpufreq_freq_transition_end(policy, &freqs, 0); in gx_set_cpuspeed() 335 static int cpufreq_gx_verify(struct cpufreq_policy *policy) in cpufreq_gx_verify() argument 340 if (!stock_freq || !policy) in cpufreq_gx_verify() 343 policy->cpu = 0; in cpufreq_gx_verify() 344 cpufreq_verify_within_limits(policy, (stock_freq / max_duration), in cpufreq_gx_verify() 353 tmp_freq = gx_validate_speed(policy->min, &tmp1, &tmp2); in cpufreq_gx_verify() 354 if (tmp_freq < policy->min) in cpufreq_gx_verify() 356 policy->min = tmp_freq; in cpufreq_gx_verify() [all …]
|
D | cpufreq_governor.c | 105 for_each_cpu(j, policy_dbs->policy->cpus) { in gov_update_cpu_data() 117 unsigned int dbs_update(struct cpufreq_policy *policy) in dbs_update() argument 119 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_update() 140 for_each_cpu(j, policy->cpus) { in dbs_update() 238 struct cpufreq_policy *policy; in dbs_work_handler() local 242 policy = policy_dbs->policy; in dbs_work_handler() 243 gov = dbs_governor_of(policy); in dbs_work_handler() 250 gov_update_sample_delay(policy_dbs, gov->gov_dbs_update(policy)); in dbs_work_handler() 279 if (!cpufreq_this_cpu_can_update(policy_dbs->policy)) in dbs_update_util_handler() 328 struct cpufreq_policy *policy = policy_dbs->policy; in gov_set_update_util() local [all …]
|
D | scmi-cpufreq.c | 32 struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); in scmi_cpufreq_get_rate() local 34 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_get_rate() 50 scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scmi_cpufreq_set_target() argument 53 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_set_target() 55 u64 freq = policy->freq_table[index].frequency * 1000; in scmi_cpufreq_set_target() 59 arch_set_freq_scale(policy->related_cpus, freq, in scmi_cpufreq_set_target() 60 policy->cpuinfo.max_freq); in scmi_cpufreq_set_target() 64 static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy, in scmi_cpufreq_fast_switch() argument 67 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_fast_switch() 72 arch_set_freq_scale(policy->related_cpus, target_freq, in scmi_cpufreq_fast_switch() [all …]
|
D | cpufreq-dt.c | 43 static int set_target(struct cpufreq_policy *policy, unsigned int index) in set_target() argument 45 struct private_data *priv = policy->driver_data; in set_target() 46 unsigned long freq = policy->freq_table[index].frequency; in set_target() 52 arch_set_freq_scale(policy->related_cpus, freq, in set_target() 53 policy->cpuinfo.max_freq); in set_target() 152 static int cpufreq_init(struct cpufreq_policy *policy) in cpufreq_init() argument 164 cpu_dev = get_cpu_device(policy->cpu); in cpufreq_init() 166 pr_err("failed to get cpu%d device\n", policy->cpu); in cpufreq_init() 178 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus); in cpufreq_init() 188 if (dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus)) in cpufreq_init() [all …]
|
D | scpi-cpufreq.c | 44 struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); in scpi_cpufreq_get_rate() local 45 struct scpi_data *priv = policy->driver_data; in scpi_cpufreq_get_rate() 52 scpi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scpi_cpufreq_set_target() argument 54 unsigned long freq = policy->freq_table[index].frequency; in scpi_cpufreq_set_target() 55 struct scpi_data *priv = policy->driver_data; in scpi_cpufreq_set_target() 67 arch_set_freq_scale(policy->related_cpus, freq, in scpi_cpufreq_set_target() 68 policy->cpuinfo.max_freq); in scpi_cpufreq_set_target() 99 static int scpi_cpufreq_init(struct cpufreq_policy *policy) in scpi_cpufreq_init() argument 107 cpu_dev = get_cpu_device(policy->cpu); in scpi_cpufreq_init() 109 pr_err("failed to get cpu%d device\n", policy->cpu); in scpi_cpufreq_init() [all …]
|
D | cpufreq_ondemand.c | 64 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, in generic_powersave_bias_target() argument 71 struct policy_dbs_info *policy_dbs = policy->governor_data; in generic_powersave_bias_target() 75 struct cpufreq_frequency_table *freq_table = policy->freq_table; in generic_powersave_bias_target() 83 index = cpufreq_frequency_table_target(policy, freq_next, relation); in generic_powersave_bias_target() 89 index = cpufreq_table_find_index_h(policy, freq_avg); in generic_powersave_bias_target() 91 index = cpufreq_table_find_index_l(policy, freq_avg); in generic_powersave_bias_target() 109 static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) in ondemand_powersave_bias_init() argument 111 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in ondemand_powersave_bias_init() 116 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument 118 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_freq_increase() [all …]
|
D | amd_freq_sensitivity.c | 41 static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy, in amd_powersave_bias_target() argument 48 struct cpu_data_t *data = &per_cpu(cpu_data, policy->cpu); in amd_powersave_bias_target() 49 struct policy_dbs_info *policy_dbs = policy->governor_data; in amd_powersave_bias_target() 53 if (!policy->freq_table) in amd_powersave_bias_target() 56 rdmsr_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, in amd_powersave_bias_target() 58 rdmsr_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_REFERENCE, in amd_powersave_bias_target() 65 freq_next = policy->cur; in amd_powersave_bias_target() 74 freq_next = policy->cur; in amd_powersave_bias_target() 85 if (data->freq_prev == policy->cur) in amd_powersave_bias_target() 86 freq_next = policy->cur; in amd_powersave_bias_target() [all …]
|
D | cpufreq_stats.c | 50 static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) in show_total_trans() argument 52 return sprintf(buf, "%d\n", policy->stats->total_trans); in show_total_trans() 55 static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) in show_time_in_state() argument 57 struct cpufreq_stats *stats = policy->stats; in show_time_in_state() 61 if (policy->fast_switch_enabled) in show_time_in_state() 73 static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, in store_reset() argument 77 cpufreq_stats_clear_table(policy->stats); in store_reset() 81 static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) in show_trans_table() argument 83 struct cpufreq_stats *stats = policy->stats; in show_trans_table() 87 if (policy->fast_switch_enabled) in show_trans_table() [all …]
|
D | ppc_cbe_cpufreq.c | 68 static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) in cbe_cpufreq_cpu_init() argument 76 cpu = of_get_cpu_node(policy->cpu, NULL); in cbe_cpufreq_cpu_init() 81 pr_debug("init cpufreq on CPU %d\n", policy->cpu); in cbe_cpufreq_cpu_init() 86 if (!cbe_get_cpu_pmd_regs(policy->cpu) || in cbe_cpufreq_cpu_init() 87 !cbe_get_cpu_mic_tm_regs(policy->cpu)) { in cbe_cpufreq_cpu_init() 113 policy->cpuinfo.transition_latency = 25000; in cbe_cpufreq_cpu_init() 115 cur_pmode = cbe_cpufreq_get_pmode(policy->cpu); in cbe_cpufreq_cpu_init() 118 policy->cur = cbe_freqs[cur_pmode].frequency; in cbe_cpufreq_cpu_init() 121 cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); in cbe_cpufreq_cpu_init() 124 policy->freq_table = cbe_freqs; in cbe_cpufreq_cpu_init() [all …]
|
D | cppc_cpufreq.c | 133 static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, in cppc_cpufreq_set_target() argument 142 cpu = all_cpu_data[policy->cpu]; in cppc_cpufreq_set_target() 150 freqs.old = policy->cur; in cppc_cpufreq_set_target() 153 cpufreq_freq_transition_begin(policy, &freqs); in cppc_cpufreq_set_target() 155 cpufreq_freq_transition_end(policy, &freqs, ret != 0); in cppc_cpufreq_set_target() 164 static int cppc_verify_policy(struct cpufreq_policy *policy) in cppc_verify_policy() argument 166 cpufreq_verify_within_cpu_limits(policy); in cppc_verify_policy() 170 static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) in cppc_cpufreq_stop_cpu() argument 172 int cpu_num = policy->cpu; in cppc_cpufreq_stop_cpu() 227 static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_init() argument [all …]
|
D | s3c64xx-cpufreq.c | 56 static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, in s3c64xx_cpufreq_set_target() argument 63 old_freq = clk_get_rate(policy->clk) / 1000; in s3c64xx_cpufreq_set_target() 80 ret = clk_set_rate(policy->clk, new_freq * 1000); in s3c64xx_cpufreq_set_target() 95 if (clk_set_rate(policy->clk, old_freq * 1000) < 0) in s3c64xx_cpufreq_set_target() 104 clk_get_rate(policy->clk) / 1000); in s3c64xx_cpufreq_set_target() 148 static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) in s3c64xx_cpufreq_driver_init() argument 153 if (policy->cpu != 0) in s3c64xx_cpufreq_driver_init() 161 policy->clk = clk_get(NULL, "armclk"); in s3c64xx_cpufreq_driver_init() 162 if (IS_ERR(policy->clk)) { in s3c64xx_cpufreq_driver_init() 164 PTR_ERR(policy->clk)); in s3c64xx_cpufreq_driver_init() [all …]
|
/Linux-v4.19/include/linux/ |
D | cpufreq.h | 85 unsigned int policy; /* see above */ member 165 void cpufreq_cpu_put(struct cpufreq_policy *policy); 175 static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } in cpufreq_cpu_put() argument 178 static inline bool policy_is_shared(struct cpufreq_policy *policy) in policy_is_shared() argument 180 return cpumask_weight(policy->cpus) > 1; in policy_is_shared() 193 int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); 196 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy); 197 void cpufreq_enable_fast_switch(struct cpufreq_policy *policy); 198 void cpufreq_disable_fast_switch(struct cpufreq_policy *policy); 216 void cpufreq_stats_create_table(struct cpufreq_policy *policy); [all …]
|
/Linux-v4.19/kernel/sched/ |
D | cpufreq_schedutil.c | 24 struct cpufreq_policy *policy; member 89 if (sg_policy->policy->fast_switch_enabled && in sugov_should_update_freq() 90 !cpufreq_this_cpu_can_update(sg_policy->policy)) in sugov_should_update_freq() 116 struct cpufreq_policy *policy = sg_policy->policy; in sugov_fast_switch() local 121 next_freq = cpufreq_driver_fast_switch(policy, next_freq); in sugov_fast_switch() 125 policy->cur = next_freq; in sugov_fast_switch() 166 struct cpufreq_policy *policy = sg_policy->policy; in get_next_freq() local 168 policy->cpuinfo.max_freq : policy->cur; in get_next_freq() 177 return cpufreq_driver_resolve_freq(policy, freq); in get_next_freq() 287 ? sg_cpu->sg_policy->policy->min : 0; in sugov_iowait_reset() [all …]
|
/Linux-v4.19/fs/crypto/ |
D | policy.c | 22 const struct fscrypt_policy *policy) in is_encryption_context_consistent_with_policy() argument 24 return memcmp(ctx->master_key_descriptor, policy->master_key_descriptor, in is_encryption_context_consistent_with_policy() 26 (ctx->flags == policy->flags) && in is_encryption_context_consistent_with_policy() 28 policy->contents_encryption_mode) && in is_encryption_context_consistent_with_policy() 30 policy->filenames_encryption_mode); in is_encryption_context_consistent_with_policy() 34 const struct fscrypt_policy *policy) in create_encryption_context_from_policy() argument 39 memcpy(ctx.master_key_descriptor, policy->master_key_descriptor, in create_encryption_context_from_policy() 42 if (!fscrypt_valid_enc_modes(policy->contents_encryption_mode, in create_encryption_context_from_policy() 43 policy->filenames_encryption_mode)) in create_encryption_context_from_policy() 46 if (policy->flags & ~FS_POLICY_FLAGS_VALID) in create_encryption_context_from_policy() [all …]
|
/Linux-v4.19/drivers/hwtracing/stm/ |
D | policy.c | 31 struct stp_policy *policy; member 97 stm = policy_node->policy->stm; in stp_policy_node_masters_store() 144 stm = policy_node->policy->stm; in stp_policy_node_channels_store() 189 struct stp_policy *policy; in stp_policy_node_make() local 192 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make() 196 policy = parent_node->policy; in stp_policy_node_make() 199 if (!policy->stm) in stp_policy_node_make() 209 policy_node->policy = policy; in stp_policy_node_make() 212 policy_node->first_master = policy->stm->data->sw_start; in stp_policy_node_make() 213 policy_node->last_master = policy->stm->data->sw_end; in stp_policy_node_make() [all …]
|
/Linux-v4.19/arch/powerpc/platforms/cell/ |
D | cpufreq_spudemand.c | 38 struct cpufreq_policy *policy; member 49 cpu = info->policy->cpu; in calc_freq() 56 return info->policy->max * info->busy_spus / FIXED_1; in calc_freq() 68 BUG_ON(info->policy == NULL); in spu_gov_work() 71 __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); in spu_gov_work() 74 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_work() 81 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_init_work() 89 static int spu_gov_start(struct cpufreq_policy *policy) in spu_gov_start() argument 91 unsigned int cpu = policy->cpu; in spu_gov_start() 101 if (!policy->cur) { in spu_gov_start() [all …]
|
/Linux-v4.19/net/tipc/ |
D | netlink.c | 145 .policy = tipc_nl_policy, 150 .policy = tipc_nl_policy, 156 .policy = tipc_nl_policy, 161 .policy = tipc_nl_policy, 166 .policy = tipc_nl_policy, 173 .policy = tipc_nl_policy, 178 .policy = tipc_nl_policy, 184 .policy = tipc_nl_policy, 189 .policy = tipc_nl_policy, 194 .policy = tipc_nl_policy, [all …]
|
/Linux-v4.19/Documentation/ABI/testing/ |
D | configfs-stp-policy | 1 What: /config/stp-policy 9 What: /config/stp-policy/<device>.<policy> 13 This group is the root of a policy; its name is a concatenation 14 of an stm device name to which this policy applies and an 17 has a policy assigned to it, mkdir will fail with EBUSY. 19 What: /config/stp-policy/<device>.<policy>/device 23 STM device to which this policy applies, read only. Same as the 26 What: /config/stp-policy/<device>.<policy>/<node> 34 What: /config/stp-policy/<device>.<policy>/<node>/masters 41 What: /config/stp-policy/<device>.<policy>/<node>/channels
|