Home
last modified time | relevance | path

Searched refs:policy (Results 1 – 25 of 558) sorted by relevance

12345678910>>...23

/Linux-v5.4/drivers/cpufreq/
Dcpufreq.c71 static unsigned int __cpufreq_get(struct cpufreq_policy *policy);
72 static int cpufreq_init_governor(struct cpufreq_policy *policy);
73 static void cpufreq_exit_governor(struct cpufreq_policy *policy);
74 static int cpufreq_start_governor(struct cpufreq_policy *policy);
75 static void cpufreq_stop_governor(struct cpufreq_policy *policy);
76 static void cpufreq_governor_limits(struct cpufreq_policy *policy);
105 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) in get_governor_parent_kobj() argument
108 return &policy->kobj; in get_governor_parent_kobj()
162 void cpufreq_generic_init(struct cpufreq_policy *policy, in cpufreq_generic_init() argument
166 policy->freq_table = table; in cpufreq_generic_init()
[all …]
Dcpufreq_userspace.c28 static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) in cpufreq_set() argument
31 unsigned int *setspeed = policy->governor_data; in cpufreq_set()
33 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set()
36 if (!per_cpu(cpu_is_managed, policy->cpu)) in cpufreq_set()
41 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L); in cpufreq_set()
47 static ssize_t show_speed(struct cpufreq_policy *policy, char *buf) in show_speed() argument
49 return sprintf(buf, "%u\n", policy->cur); in show_speed()
52 static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy) in cpufreq_userspace_policy_init() argument
60 policy->governor_data = setspeed; in cpufreq_userspace_policy_init()
64 static void cpufreq_userspace_policy_exit(struct cpufreq_policy *policy) in cpufreq_userspace_policy_exit() argument
[all …]
Dfreq_table.c17 bool policy_has_boost_freq(struct cpufreq_policy *policy) in policy_has_boost_freq() argument
19 struct cpufreq_frequency_table *pos, *table = policy->freq_table; in policy_has_boost_freq()
32 int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, in cpufreq_frequency_table_cpuinfo() argument
54 policy->min = policy->cpuinfo.min_freq = min_freq; in cpufreq_frequency_table_cpuinfo()
55 policy->max = policy->cpuinfo.max_freq = max_freq; in cpufreq_frequency_table_cpuinfo()
57 if (policy->min == ~0) in cpufreq_frequency_table_cpuinfo()
63 int cpufreq_frequency_table_verify(struct cpufreq_policy *policy, in cpufreq_frequency_table_verify() argument
71 policy->min, policy->max, policy->cpu); in cpufreq_frequency_table_verify()
73 cpufreq_verify_within_cpu_limits(policy); in cpufreq_frequency_table_verify()
78 if ((freq >= policy->min) && (freq <= policy->max)) { in cpufreq_frequency_table_verify()
[all …]
Dsh-cpufreq.c34 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 …]
Dlongrun.c35 static void longrun_get_policy(struct cpufreq_policy *policy) in longrun_get_policy() argument
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()
57 policy->max = longrun_low_freq + msr_hi * in longrun_get_policy()
60 policy->cpu = 0; in longrun_get_policy()
71 static int longrun_set_policy(struct cpufreq_policy *policy) in longrun_set_policy() argument
76 if (!policy) in longrun_set_policy()
83 pctg_lo = (policy->min - longrun_low_freq) / in longrun_set_policy()
[all …]
Dunicore2-cpufreq.c25 static int ucv2_verify_speed(struct cpufreq_policy *policy) in ucv2_verify_speed() argument
27 if (policy->cpu) in ucv2_verify_speed()
30 cpufreq_verify_within_cpu_limits(policy); in ucv2_verify_speed()
34 static int ucv2_target(struct cpufreq_policy *policy, in ucv2_target() argument
41 freqs.old = policy->cur; in ucv2_target()
44 cpufreq_freq_transition_begin(policy, &freqs); in ucv2_target()
45 ret = clk_set_rate(policy->clk, target_freq * 1000); in ucv2_target()
46 cpufreq_freq_transition_end(policy, &freqs, ret); in ucv2_target()
51 static int __init ucv2_cpu_init(struct cpufreq_policy *policy) in ucv2_cpu_init() argument
53 if (policy->cpu != 0) in ucv2_cpu_init()
[all …]
Dgx-suspmod.c250 static void gx_set_cpuspeed(struct cpufreq_policy *policy, unsigned int khz) in gx_set_cpuspeed() argument
264 cpufreq_freq_transition_begin(policy, &freqs); in gx_set_cpuspeed()
313 cpufreq_freq_transition_end(policy, &freqs, 0); in gx_set_cpuspeed()
331 static int cpufreq_gx_verify(struct cpufreq_policy *policy) in cpufreq_gx_verify() argument
336 if (!stock_freq || !policy) in cpufreq_gx_verify()
339 policy->cpu = 0; in cpufreq_gx_verify()
340 cpufreq_verify_within_limits(policy, (stock_freq / max_duration), in cpufreq_gx_verify()
349 tmp_freq = gx_validate_speed(policy->min, &tmp1, &tmp2); in cpufreq_gx_verify()
350 if (tmp_freq < policy->min) in cpufreq_gx_verify()
352 policy->min = tmp_freq; in cpufreq_gx_verify()
[all …]
Dcpufreq_governor.c102 for_each_cpu(j, policy_dbs->policy->cpus) { in gov_update_cpu_data()
114 unsigned int dbs_update(struct cpufreq_policy *policy) in dbs_update() argument
116 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_update()
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()
247 gov_update_sample_delay(policy_dbs, gov->gov_dbs_update(policy)); in dbs_work_handler()
276 if (!cpufreq_this_cpu_can_update(policy_dbs->policy)) in dbs_update_util_handler()
325 struct cpufreq_policy *policy = policy_dbs->policy; in gov_set_update_util() local
[all …]
Dacpi-cpufreq.c138 static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf) in show_freqdomain_cpus() argument
140 struct acpi_cpufreq_data *data = policy->driver_data; in show_freqdomain_cpus()
151 static ssize_t store_cpb(struct cpufreq_policy *policy, const char *buf, in store_cpb() argument
169 static ssize_t show_cpb(struct cpufreq_policy *policy, char *buf) in show_cpb() argument
191 static unsigned extract_io(struct cpufreq_policy *policy, u32 value) in extract_io() argument
193 struct acpi_cpufreq_data *data = policy->driver_data; in extract_io()
201 return policy->freq_table[i].frequency; in extract_io()
206 static unsigned extract_msr(struct cpufreq_policy *policy, u32 msr) in extract_msr() argument
208 struct acpi_cpufreq_data *data = policy->driver_data; in extract_msr()
221 cpufreq_for_each_entry(pos, policy->freq_table) in extract_msr()
[all …]
Dcpufreq-dt.c39 static int set_target(struct cpufreq_policy *policy, unsigned int index) in set_target() argument
41 struct private_data *priv = policy->driver_data; in set_target()
42 unsigned long freq = policy->freq_table[index].frequency; in set_target()
48 arch_set_freq_scale(policy->related_cpus, freq, in set_target()
49 policy->cpuinfo.max_freq); in set_target()
148 static int cpufreq_init(struct cpufreq_policy *policy) in cpufreq_init() argument
160 cpu_dev = get_cpu_device(policy->cpu); in cpufreq_init()
162 pr_err("failed to get cpu%d device\n", policy->cpu); in cpufreq_init()
174 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus); in cpufreq_init()
184 if (dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus)) in cpufreq_init()
[all …]
Dqcom-cpufreq-hw.c34 static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy, in qcom_cpufreq_hw_target_index() argument
37 void __iomem *perf_state_reg = policy->driver_data; in qcom_cpufreq_hw_target_index()
38 unsigned long freq = policy->freq_table[index].frequency; in qcom_cpufreq_hw_target_index()
42 arch_set_freq_scale(policy->related_cpus, freq, in qcom_cpufreq_hw_target_index()
43 policy->cpuinfo.max_freq); in qcom_cpufreq_hw_target_index()
50 struct cpufreq_policy *policy; in qcom_cpufreq_hw_get() local
53 policy = cpufreq_cpu_get_raw(cpu); in qcom_cpufreq_hw_get()
54 if (!policy) in qcom_cpufreq_hw_get()
57 perf_state_reg = policy->driver_data; in qcom_cpufreq_hw_get()
62 return policy->freq_table[index].frequency; in qcom_cpufreq_hw_get()
[all …]
Dppc_cbe_cpufreq.c55 static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) in cbe_cpufreq_cpu_init() argument
63 cpu = of_get_cpu_node(policy->cpu, NULL); in cbe_cpufreq_cpu_init()
68 pr_debug("init cpufreq on CPU %d\n", policy->cpu); in cbe_cpufreq_cpu_init()
73 if (!cbe_get_cpu_pmd_regs(policy->cpu) || in cbe_cpufreq_cpu_init()
74 !cbe_get_cpu_mic_tm_regs(policy->cpu)) { in cbe_cpufreq_cpu_init()
101 policy->cpuinfo.transition_latency = 25000; in cbe_cpufreq_cpu_init()
103 cur_pmode = cbe_cpufreq_get_pmode(policy->cpu); in cbe_cpufreq_cpu_init()
106 policy->cur = cbe_freqs[cur_pmode].frequency; in cbe_cpufreq_cpu_init()
109 cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu)); in cbe_cpufreq_cpu_init()
112 policy->freq_table = cbe_freqs; in cbe_cpufreq_cpu_init()
[all …]
Dcpufreq_ondemand.c61 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, in generic_powersave_bias_target() argument
68 struct policy_dbs_info *policy_dbs = policy->governor_data; in generic_powersave_bias_target()
72 struct cpufreq_frequency_table *freq_table = policy->freq_table; in generic_powersave_bias_target()
80 index = cpufreq_frequency_table_target(policy, freq_next, relation); in generic_powersave_bias_target()
86 index = cpufreq_table_find_index_h(policy, freq_avg); in generic_powersave_bias_target()
88 index = cpufreq_table_find_index_l(policy, freq_avg); in generic_powersave_bias_target()
106 static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) in ondemand_powersave_bias_init() argument
108 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in ondemand_powersave_bias_init()
113 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument
115 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_freq_increase()
[all …]
Dscpi-cpufreq.c42 struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); in scpi_cpufreq_get_rate() local
43 struct scpi_data *priv = policy->driver_data; in scpi_cpufreq_get_rate()
50 scpi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scpi_cpufreq_set_target() argument
52 unsigned long freq = policy->freq_table[index].frequency; in scpi_cpufreq_set_target()
53 struct scpi_data *priv = policy->driver_data; in scpi_cpufreq_set_target()
65 arch_set_freq_scale(policy->related_cpus, freq, in scpi_cpufreq_set_target()
66 policy->cpuinfo.max_freq); in scpi_cpufreq_set_target()
97 static int scpi_cpufreq_init(struct cpufreq_policy *policy) in scpi_cpufreq_init() argument
105 cpu_dev = get_cpu_device(policy->cpu); in scpi_cpufreq_init()
107 pr_err("failed to get cpu%d device\n", policy->cpu); in scpi_cpufreq_init()
[all …]
Dscmi-cpufreq.c31 struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); in scmi_cpufreq_get_rate() local
33 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_get_rate()
49 scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scmi_cpufreq_set_target() argument
52 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_set_target()
54 u64 freq = policy->freq_table[index].frequency; in scmi_cpufreq_set_target()
58 arch_set_freq_scale(policy->related_cpus, freq, in scmi_cpufreq_set_target()
59 policy->cpuinfo.max_freq); in scmi_cpufreq_set_target()
63 static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy, in scmi_cpufreq_fast_switch() argument
66 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_fast_switch()
71 arch_set_freq_scale(policy->related_cpus, target_freq, in scmi_cpufreq_fast_switch()
[all …]
Damd_freq_sensitivity.c38 static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy, in amd_powersave_bias_target() argument
45 struct cpu_data_t *data = &per_cpu(cpu_data, policy->cpu); in amd_powersave_bias_target()
46 struct policy_dbs_info *policy_dbs = policy->governor_data; in amd_powersave_bias_target()
50 if (!policy->freq_table) in amd_powersave_bias_target()
53 rdmsr_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, in amd_powersave_bias_target()
55 rdmsr_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_REFERENCE, in amd_powersave_bias_target()
62 freq_next = policy->cur; in amd_powersave_bias_target()
71 freq_next = policy->cur; in amd_powersave_bias_target()
82 if (data->freq_prev == policy->cur) in amd_powersave_bias_target()
83 freq_next = policy->cur; in amd_powersave_bias_target()
[all …]
Dcpufreq_stats.c47 static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) in show_total_trans() argument
49 return sprintf(buf, "%d\n", policy->stats->total_trans); in show_total_trans()
53 static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) in show_time_in_state() argument
55 struct cpufreq_stats *stats = policy->stats; in show_time_in_state()
59 if (policy->fast_switch_enabled) in show_time_in_state()
75 static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, in store_reset() argument
79 cpufreq_stats_clear_table(policy->stats); in store_reset()
84 static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) in show_trans_table() argument
86 struct cpufreq_stats *stats = policy->stats; in show_trans_table()
90 if (policy->fast_switch_enabled) in show_trans_table()
[all …]
Dintel_pstate.c236 unsigned int policy; member
399 static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy) in intel_pstate_init_acpi_perf_limits() argument
406 intel_pstate_set_itmt_prio(policy->cpu); in intel_pstate_init_acpi_perf_limits()
413 cpu = all_cpu_data[policy->cpu]; in intel_pstate_init_acpi_perf_limits()
416 policy->cpu); in intel_pstate_init_acpi_perf_limits()
436 pr_debug("CPU%u - ACPI _PSS perf data\n", policy->cpu); in intel_pstate_init_acpi_perf_limits()
458 policy->cpuinfo.max_freq / 1000; in intel_pstate_init_acpi_perf_limits()
466 acpi_processor_unregister_performance(policy->cpu); in intel_pstate_init_acpi_perf_limits()
469 static void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy) in intel_pstate_exit_perf_limits() argument
473 cpu = all_cpu_data[policy->cpu]; in intel_pstate_exit_perf_limits()
[all …]
Domap-cpufreq.c42 static int omap_target(struct cpufreq_policy *policy, unsigned int index) in omap_target() argument
49 old_freq = policy->cur; in omap_target()
53 ret = clk_round_rate(policy->clk, freq); in omap_target()
89 ret = clk_set_rate(policy->clk, new_freq * 1000); in omap_target()
97 clk_set_rate(policy->clk, old_freq * 1000); in omap_target()
111 static int omap_cpu_init(struct cpufreq_policy *policy) in omap_cpu_init() argument
115 policy->clk = clk_get(NULL, "cpufreq_ck"); in omap_cpu_init()
116 if (IS_ERR(policy->clk)) in omap_cpu_init()
117 return PTR_ERR(policy->clk); in omap_cpu_init()
124 __func__, policy->cpu, result); in omap_cpu_init()
[all …]
/Linux-v5.4/include/linux/
Dcpufreq.h71 unsigned int policy; /* see above */ member
152 struct cpufreq_policy *policy; member
167 void cpufreq_cpu_put(struct cpufreq_policy *policy);
177 static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } in cpufreq_cpu_put() argument
180 static inline bool policy_is_inactive(struct cpufreq_policy *policy) in policy_is_inactive() argument
182 return cpumask_empty(policy->cpus); in policy_is_inactive()
185 static inline bool policy_is_shared(struct cpufreq_policy *policy) in policy_is_shared() argument
187 return cpumask_weight(policy->cpus) > 1; in policy_is_shared()
202 void cpufreq_cpu_release(struct cpufreq_policy *policy);
203 int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
[all …]
/Linux-v5.4/fs/crypto/
Dpolicy.c47 const struct fscrypt_policy_v1 *policy = &policy_u->v1; in fscrypt_supported_policy() local
49 if (!fscrypt_valid_enc_modes(policy->contents_encryption_mode, in fscrypt_supported_policy()
50 policy->filenames_encryption_mode)) { in fscrypt_supported_policy()
53 policy->contents_encryption_mode, in fscrypt_supported_policy()
54 policy->filenames_encryption_mode); in fscrypt_supported_policy()
58 if (policy->flags & ~FSCRYPT_POLICY_FLAGS_VALID) { in fscrypt_supported_policy()
61 policy->flags); in fscrypt_supported_policy()
68 const struct fscrypt_policy_v2 *policy = &policy_u->v2; in fscrypt_supported_policy() local
70 if (!fscrypt_valid_enc_modes(policy->contents_encryption_mode, in fscrypt_supported_policy()
71 policy->filenames_encryption_mode)) { in fscrypt_supported_policy()
[all …]
/Linux-v5.4/drivers/hwtracing/stm/
Dpolicy.c31 struct stp_policy *policy; member
115 stm = policy_node->policy->stm; in stp_policy_node_masters_store()
162 stm = policy_node->policy->stm; in stp_policy_node_channels_store()
233 struct stp_policy *policy; in stp_policy_node_make() local
236 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make()
240 policy = parent_node->policy; in stp_policy_node_make()
243 if (!policy->stm) in stp_policy_node_make()
246 pdrv = policy->stm->pdrv; in stp_policy_node_make()
256 if (policy->stm->pdrv_node_type) in stp_policy_node_make()
257 type = policy->stm->pdrv_node_type; in stp_policy_node_make()
[all …]
/Linux-v5.4/kernel/sched/
Dcpufreq_schedutil.c24 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()
119 struct cpufreq_policy *policy = sg_policy->policy; in sugov_fast_switch() local
125 next_freq = cpufreq_driver_fast_switch(policy, next_freq); in sugov_fast_switch()
129 policy->cur = next_freq; in sugov_fast_switch()
132 for_each_cpu(cpu, policy->cpus) in sugov_fast_switch()
174 struct cpufreq_policy *policy = sg_policy->policy; in get_next_freq() local
176 policy->cpuinfo.max_freq : policy->cur; in get_next_freq()
185 return cpufreq_driver_resolve_freq(policy, freq); in get_next_freq()
[all …]
/Linux-v5.4/arch/powerpc/platforms/cell/
Dcpufreq_spudemand.c25 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()
58 __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); in spu_gov_work()
61 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_work()
68 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_init_work()
76 static int spu_gov_start(struct cpufreq_policy *policy) in spu_gov_start() argument
78 unsigned int cpu = policy->cpu; in spu_gov_start()
88 if (!policy->cur) { in spu_gov_start()
[all …]
/Linux-v5.4/Documentation/ABI/testing/
Dconfigfs-stp-policy1 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

12345678910>>...23