Home
last modified time | relevance | path

Searched refs:policy (Results 1 – 200 of 446) sorted by relevance

123

/linux-4.4.14/drivers/cpufreq/
Dcpufreq.c36 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()
41 static bool suitable_policy(struct cpufreq_policy *policy, bool active) in suitable_policy() argument
43 return active == !policy_is_inactive(policy); in suitable_policy()
47 static struct cpufreq_policy *next_policy(struct cpufreq_policy *policy, in next_policy() argument
51 policy = list_next_entry(policy, policy_list); in next_policy()
54 if (&policy->policy_list == &cpufreq_policy_list) in next_policy()
56 } while (!suitable_policy(policy, active)); in next_policy()
58 return policy; in next_policy()
63 struct cpufreq_policy *policy; in first_policy() local
[all …]
Dcpufreq_governor.c38 struct cpufreq_policy *policy = cdbs->shared->policy; in dbs_check_cpu() local
64 for_each_cpu(j, policy->cpus) { in dbs_check_cpu()
169 void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy, in gov_queue_work() argument
184 for_each_cpu(i, policy->cpus) in gov_queue_work()
191 struct cpufreq_policy *policy) in gov_cancel_work() argument
196 for_each_cpu(i, policy->cpus) { in gov_cancel_work()
206 if (policy_is_shared(shared->policy)) { in need_load_eval()
225 struct cpufreq_policy *policy; in dbs_timer() local
232 policy = shared->policy; in dbs_timer()
238 if (!policy) in dbs_timer()
[all …]
Dfreq_table.c21 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()
69 int cpufreq_frequency_table_verify(struct cpufreq_policy *policy, in cpufreq_frequency_table_verify() argument
77 policy->min, policy->max, policy->cpu); in cpufreq_frequency_table_verify()
79 cpufreq_verify_within_cpu_limits(policy); in cpufreq_frequency_table_verify()
84 if ((freq >= policy->min) && (freq <= policy->max)) { in cpufreq_frequency_table_verify()
[all …]
Dsh-cpufreq.c41 static int sh_cpufreq_target(struct cpufreq_policy *policy, in sh_cpufreq_target() argument
45 unsigned int cpu = policy->cpu; in sh_cpufreq_target()
62 if (freq < (policy->min * 1000) || freq > (policy->max * 1000)) in sh_cpufreq_target()
71 cpufreq_freq_transition_begin(policy, &freqs); in sh_cpufreq_target()
74 cpufreq_freq_transition_end(policy, &freqs, 0); in sh_cpufreq_target()
81 static int sh_cpufreq_verify(struct cpufreq_policy *policy) in sh_cpufreq_verify() argument
83 struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu); in sh_cpufreq_verify()
88 return cpufreq_frequency_table_verify(policy, freq_table); in sh_cpufreq_verify()
90 cpufreq_verify_within_cpu_limits(policy); in sh_cpufreq_verify()
92 policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000; in sh_cpufreq_verify()
[all …]
Dcppc_cpufreq.c35 static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, in cppc_cpufreq_set_target() argument
43 cpu = all_cpu_data[policy->cpu]; in cppc_cpufreq_set_target()
46 freqs.old = policy->cur; in cppc_cpufreq_set_target()
49 cpufreq_freq_transition_begin(policy, &freqs); in cppc_cpufreq_set_target()
51 cpufreq_freq_transition_end(policy, &freqs, ret != 0); in cppc_cpufreq_set_target()
60 static int cppc_verify_policy(struct cpufreq_policy *policy) in cppc_verify_policy() argument
62 cpufreq_verify_within_cpu_limits(policy); in cppc_verify_policy()
66 static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) in cppc_cpufreq_stop_cpu() argument
68 int cpu_num = policy->cpu; in cppc_cpufreq_stop_cpu()
80 static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_init() argument
[all …]
Dunicore2-cpufreq.c28 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 …]
Dcpufreq_userspace.c31 static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) in cpufreq_set() argument
35 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set()
38 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_governor_userspace(struct cpufreq_policy *policy, in cpufreq_governor_userspace() argument
55 unsigned int cpu = policy->cpu; in cpufreq_governor_userspace()
60 BUG_ON(!policy->cur); in cpufreq_governor_userspace()
77 cpu, policy->min, policy->max, in cpufreq_governor_userspace()
[all …]
Dlongrun.c36 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 …]
Dgx-suspmod.c254 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 …]
Dcpufreq_stats.c44 static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) in show_total_trans() argument
46 return sprintf(buf, "%d\n", policy->stats->total_trans); in show_total_trans()
49 static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) in show_time_in_state() argument
51 struct cpufreq_stats *stats = policy->stats; in show_time_in_state()
65 static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) in show_trans_table() argument
67 struct cpufreq_stats *stats = policy->stats; in show_trans_table()
133 static void __cpufreq_stats_free_table(struct cpufreq_policy *policy) in __cpufreq_stats_free_table() argument
135 struct cpufreq_stats *stats = policy->stats; in __cpufreq_stats_free_table()
143 sysfs_remove_group(&policy->kobj, &stats_attr_group); in __cpufreq_stats_free_table()
146 policy->stats = NULL; in __cpufreq_stats_free_table()
[all …]
Damd_freq_sensitivity.c40 static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy, in amd_powersave_bias_target() argument
47 struct cpu_data_t *data = &per_cpu(cpu_data, policy->cpu); in amd_powersave_bias_target()
48 struct dbs_data *od_data = policy->governor_data; in amd_powersave_bias_target()
51 od_data->cdata->get_cpu_dbs_info_s(policy->cpu); 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 …]
Dppc_cbe_cpufreq.c68 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()
126 return cpufreq_table_validate_and_show(policy, cbe_freqs); in cbe_cpufreq_cpu_init()
[all …]
Dcpufreq_ondemand.c76 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, in generic_powersave_bias_target() argument
84 policy->cpu); in generic_powersave_bias_target()
85 struct dbs_data *dbs_data = policy->governor_data; in generic_powersave_bias_target()
94 cpufreq_frequency_table_target(policy, dbs_info->freq_table, freq_next, in generic_powersave_bias_target()
102 cpufreq_frequency_table_target(policy, dbs_info->freq_table, freq_avg, in generic_powersave_bias_target()
106 cpufreq_frequency_table_target(policy, dbs_info->freq_table, freq_avg, in generic_powersave_bias_target()
135 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument
137 struct dbs_data *dbs_data = policy->governor_data; in dbs_freq_increase()
141 freq = od_ops.powersave_bias_target(policy, freq, in dbs_freq_increase()
143 else if (policy->cur == policy->max) in dbs_freq_increase()
[all …]
Dintegrator-cpufreq.c59 static int integrator_verify_policy(struct cpufreq_policy *policy) in integrator_verify_policy() argument
63 cpufreq_verify_within_cpu_limits(policy); in integrator_verify_policy()
65 vco = icst_hz_to_vco(&cclk_params, policy->max * 1000); in integrator_verify_policy()
66 policy->max = icst_hz(&cclk_params, vco) / 1000; in integrator_verify_policy()
68 vco = icst_hz_to_vco(&cclk_params, policy->min * 1000); in integrator_verify_policy()
69 policy->min = icst_hz(&cclk_params, vco) / 1000; in integrator_verify_policy()
71 cpufreq_verify_within_cpu_limits(policy); in integrator_verify_policy()
76 static int integrator_set_target(struct cpufreq_policy *policy, in integrator_set_target() argument
81 int cpu = policy->cpu; in integrator_set_target()
114 if (target_freq > policy->max) in integrator_set_target()
[all …]
Ddavinci-cpufreq.c41 static int davinci_verify_speed(struct cpufreq_policy *policy) in davinci_verify_speed() argument
48 return cpufreq_frequency_table_verify(policy, freq_table); in davinci_verify_speed()
50 if (policy->cpu) in davinci_verify_speed()
53 cpufreq_verify_within_cpu_limits(policy); in davinci_verify_speed()
54 policy->min = clk_round_rate(armclk, policy->min * 1000) / 1000; in davinci_verify_speed()
55 policy->max = clk_round_rate(armclk, policy->max * 1000) / 1000; in davinci_verify_speed()
56 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, in davinci_verify_speed()
57 policy->cpuinfo.max_freq); in davinci_verify_speed()
61 static int davinci_target(struct cpufreq_policy *policy, unsigned int idx) in davinci_target() argument
68 old_freq = policy->cur; in davinci_target()
[all …]
Ds3c64xx-cpufreq.c56 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 …]
Dcpufreq-nforce2.c252 static int nforce2_target(struct cpufreq_policy *policy, in nforce2_target() argument
259 if ((target_freq > policy->max) || (target_freq < policy->min)) in nforce2_target()
264 freqs.old = nforce2_get(policy->cpu); in nforce2_target()
273 cpufreq_freq_transition_begin(policy, &freqs); in nforce2_target()
288 cpufreq_freq_transition_end(policy, &freqs, 0); in nforce2_target()
297 static int nforce2_verify(struct cpufreq_policy *policy) in nforce2_verify() argument
301 fsb_pol_max = policy->max / (fid * 100); in nforce2_verify()
303 if (policy->min < (fsb_pol_max * fid * 100)) in nforce2_verify()
304 policy->max = (fsb_pol_max + 1) * fid * 100; in nforce2_verify()
306 cpufreq_verify_within_cpu_limits(policy); in nforce2_verify()
[all …]
Dcpufreq_conservative.c26 static int cs_cpufreq_governor_dbs(struct cpufreq_policy *policy,
40 struct cpufreq_policy *policy) in get_freq_target() argument
42 unsigned int freq_target = (cs_tuners->freq_step * policy->max) / 100; in get_freq_target()
63 struct cpufreq_policy *policy = dbs_info->cdbs.shared->policy; in cs_check_cpu() local
64 struct dbs_data *dbs_data = policy->governor_data; in cs_check_cpu()
79 if (dbs_info->requested_freq == policy->max) in cs_check_cpu()
82 dbs_info->requested_freq += get_freq_target(cs_tuners, policy); in cs_check_cpu()
84 if (dbs_info->requested_freq > policy->max) in cs_check_cpu()
85 dbs_info->requested_freq = policy->max; in cs_check_cpu()
87 __cpufreq_driver_target(policy, dbs_info->requested_freq, in cs_check_cpu()
[all …]
Dcpufreq-dt.c45 static int set_target(struct cpufreq_policy *policy, unsigned int index) in set_target() argument
48 struct cpufreq_frequency_table *freq_table = policy->freq_table; in set_target()
49 struct clk *cpu_clk = policy->clk; in set_target()
50 struct private_data *priv = policy->driver_data; in set_target()
191 static int cpufreq_init(struct cpufreq_policy *policy) in cpufreq_init() argument
205 ret = allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk); in cpufreq_init()
213 dev_err(cpu_dev, "failed to find cpu%d node\n", policy->cpu); in cpufreq_init()
219 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus); in cpufreq_init()
241 dev_pm_opp_of_cpumask_add_table(policy->cpus); in cpufreq_init()
258 cpumask_setall(policy->cpus); in cpufreq_init()
[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()
91 ret = clk_set_rate(policy->clk, new_freq * 1000); in omap_target()
99 clk_set_rate(policy->clk, old_freq * 1000); in omap_target()
113 static int omap_cpu_init(struct cpufreq_policy *policy) in omap_cpu_init() argument
117 policy->clk = clk_get(NULL, "cpufreq_ck"); in omap_cpu_init()
118 if (IS_ERR(policy->clk)) in omap_cpu_init()
119 return PTR_ERR(policy->clk); in omap_cpu_init()
126 __func__, policy->cpu, result); in omap_cpu_init()
[all …]
Dmt8173-cpufreq.c172 static int mtk_cpufreq_set_target(struct cpufreq_policy *policy, in mtk_cpufreq_set_target() argument
175 struct cpufreq_frequency_table *freq_table = policy->freq_table; in mtk_cpufreq_set_target()
176 struct clk *cpu_clk = policy->clk; in mtk_cpufreq_set_target()
178 struct mtk_cpu_dvfs_info *info = policy->driver_data; in mtk_cpufreq_set_target()
196 policy->cpu, freq_hz); in mtk_cpufreq_set_target()
211 policy->cpu); in mtk_cpufreq_set_target()
221 policy->cpu); in mtk_cpufreq_set_target()
231 policy->cpu); in mtk_cpufreq_set_target()
241 policy->cpu); in mtk_cpufreq_set_target()
255 policy->cpu); in mtk_cpufreq_set_target()
[all …]
Dacpi-cpufreq.c148 static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf) in show_freqdomain_cpus() argument
150 struct acpi_cpufreq_data *data = policy->driver_data; in show_freqdomain_cpus()
178 static ssize_t store_cpb(struct cpufreq_policy *policy, const char *buf, in store_cpb() argument
184 static ssize_t show_cpb(struct cpufreq_policy *policy, char *buf) in show_cpb() argument
375 struct cpufreq_policy *policy; in get_cur_freq_on_cpu() local
381 policy = cpufreq_cpu_get_raw(cpu); in get_cur_freq_on_cpu()
382 if (unlikely(!policy)) in get_cur_freq_on_cpu()
385 data = policy->driver_data; in get_cur_freq_on_cpu()
419 static int acpi_cpufreq_target(struct cpufreq_policy *policy, in acpi_cpufreq_target() argument
422 struct acpi_cpufreq_data *data = policy->driver_data; in acpi_cpufreq_target()
[all …]
Dia64-acpi-cpufreq.c138 struct cpufreq_policy *policy, in processor_set_freq() argument
149 set_cpus_allowed_ptr(current, cpumask_of(policy->cpu)); in processor_set_freq()
150 if (smp_processor_id() != policy->cpu) { in processor_set_freq()
209 struct cpufreq_policy *policy, in acpi_cpufreq_target() argument
212 return processor_set_freq(acpi_io_data[policy->cpu], policy, index); in acpi_cpufreq_target()
217 struct cpufreq_policy *policy) in acpi_cpufreq_cpu_init() argument
220 unsigned int cpu = policy->cpu; in acpi_cpufreq_cpu_init()
266 policy->cpuinfo.transition_latency = 0; in acpi_cpufreq_cpu_init()
269 policy->cpuinfo.transition_latency) { in acpi_cpufreq_cpu_init()
270 policy->cpuinfo.transition_latency = in acpi_cpufreq_cpu_init()
[all …]
Dspeedstep-centrino.c232 static int centrino_cpu_init_table(struct cpufreq_policy *policy) in centrino_cpu_init_table() argument
234 struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); in centrino_cpu_init_table()
259 per_cpu(centrino_model, policy->cpu) = model; in centrino_cpu_init_table()
268 static inline int centrino_cpu_init_table(struct cpufreq_policy *policy) in centrino_cpu_init_table() argument
343 static int centrino_cpu_init(struct cpufreq_policy *policy) in centrino_cpu_init() argument
345 struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); in centrino_cpu_init()
357 if (policy->cpu != 0) in centrino_cpu_init()
365 per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i]; in centrino_cpu_init()
367 if (!per_cpu(centrino_cpu, policy->cpu)) { in centrino_cpu_init()
374 if (centrino_cpu_init_table(policy)) in centrino_cpu_init()
[all …]
Dqoriq-cpufreq.c123 static void set_affected_cpus(struct cpufreq_policy *policy) in set_affected_cpus() argument
126 struct cpumask *dstp = policy->cpus; in set_affected_cpus()
129 np = cpu_to_clk_node(policy->cpu); in set_affected_cpus()
197 static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) in qoriq_cpufreq_cpu_init() argument
205 unsigned int cpu = policy->cpu; in qoriq_cpufreq_cpu_init()
216 policy->clk = of_clk_get(np, 0); in qoriq_cpufreq_cpu_init()
217 if (IS_ERR(policy->clk)) { in qoriq_cpufreq_cpu_init()
265 ret = cpufreq_table_validate_and_show(policy, table); in qoriq_cpufreq_cpu_init()
274 set_affected_cpus(policy); in qoriq_cpufreq_cpu_init()
275 policy->driver_data = data; in qoriq_cpufreq_cpu_init()
[all …]
Dtegra20-cpufreq.c50 static unsigned int tegra_get_intermediate(struct cpufreq_policy *policy, in tegra_get_intermediate() argument
60 if ((freq_table[index].frequency == ifreq) || (policy->cur == ifreq)) in tegra_get_intermediate()
66 static int tegra_target_intermediate(struct cpufreq_policy *policy, in tegra_target_intermediate() argument
92 static int tegra_target(struct cpufreq_policy *policy, unsigned int index) in tegra_target() argument
137 static int tegra_cpu_init(struct cpufreq_policy *policy) in tegra_cpu_init() argument
141 if (policy->cpu >= NUM_CPUS) in tegra_cpu_init()
148 ret = cpufreq_generic_init(policy, freq_table, 300 * 1000); in tegra_cpu_init()
155 policy->clk = cpu_clk; in tegra_cpu_init()
156 policy->suspend_freq = freq_table[0].frequency; in tegra_cpu_init()
160 static int tegra_cpu_exit(struct cpufreq_policy *policy) in tegra_cpu_exit() argument
Dpxa3xx-cpufreq.c90 static int setup_freqs_table(struct cpufreq_policy *policy, in setup_freqs_table() argument
111 return cpufreq_table_validate_and_show(policy, table); in setup_freqs_table()
158 static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy, unsigned int index) in pxa3xx_cpufreq_set() argument
163 if (policy->cpu != 0) in pxa3xx_cpufreq_set()
176 static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy) in pxa3xx_cpufreq_init() argument
181 policy->min = policy->cpuinfo.min_freq = 104000; in pxa3xx_cpufreq_init()
182 policy->max = policy->cpuinfo.max_freq = in pxa3xx_cpufreq_init()
184 policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ in pxa3xx_cpufreq_init()
187 ret = setup_freqs_table(policy, pxa300_freqs, in pxa3xx_cpufreq_init()
191 ret = setup_freqs_table(policy, pxa320_freqs, in pxa3xx_cpufreq_init()
Dp4-clockmod.c108 static int cpufreq_p4_target(struct cpufreq_policy *policy, unsigned int index) in cpufreq_p4_target() argument
116 for_each_cpu(i, policy->cpus) in cpufreq_p4_target()
168 static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) in cpufreq_p4_cpu_init() argument
170 struct cpuinfo_x86 *c = &cpu_data(policy->cpu); in cpufreq_p4_cpu_init()
175 cpumask_copy(policy->cpus, topology_sibling_cpumask(policy->cpu)); in cpufreq_p4_cpu_init()
185 has_N44_O17_errata[policy->cpu] = 1; in cpufreq_p4_cpu_init()
192 cpufreq_p4_setdc(policy->cpu, DC_DISABLE); in cpufreq_p4_cpu_init()
202 if ((i < 2) && (has_N44_O17_errata[policy->cpu])) in cpufreq_p4_cpu_init()
212 policy->cpuinfo.transition_latency = 10000001; in cpufreq_p4_cpu_init()
214 return cpufreq_table_validate_and_show(policy, &p4clockmod_table[0]); in cpufreq_p4_cpu_init()
Dat32ap-cpufreq.c29 static int at32_set_target(struct cpufreq_policy *policy, unsigned int index) in at32_set_target() argument
33 old_freq = policy->cur; in at32_set_target()
44 clk_set_rate(policy->clk, new_freq * 1000); in at32_set_target()
52 static int at32_cpufreq_driver_init(struct cpufreq_policy *policy) in at32_cpufreq_driver_init() argument
58 if (policy->cpu != 0) in at32_cpufreq_driver_init()
70 policy->cpuinfo.transition_latency = 0; in at32_cpufreq_driver_init()
98 policy->clk = cpuclk; in at32_cpufreq_driver_init()
101 retval = cpufreq_table_validate_and_show(policy, freq_table); in at32_cpufreq_driver_init()
Dspeedstep-ich.c258 static int speedstep_target(struct cpufreq_policy *policy, unsigned int index) in speedstep_target() argument
262 policy_cpu = cpumask_any_and(policy->cpus, cpu_online_mask); in speedstep_target()
272 struct cpufreq_policy *policy; member
284 &get_freqs->policy->cpuinfo.transition_latency, in get_freqs_on_cpu()
288 static int speedstep_cpu_init(struct cpufreq_policy *policy) in speedstep_cpu_init() argument
295 cpumask_copy(policy->cpus, topology_sibling_cpumask(policy->cpu)); in speedstep_cpu_init()
297 policy_cpu = cpumask_any_and(policy->cpus, cpu_online_mask); in speedstep_cpu_init()
300 gf.policy = policy; in speedstep_cpu_init()
305 return cpufreq_table_validate_and_show(policy, speedstep_freqs); in speedstep_cpu_init()
Dsfi-cpufreq.c55 static int sfi_cpufreq_target(struct cpufreq_policy *policy, unsigned int index) in sfi_cpufreq_target() argument
60 next_perf_state = policy->freq_table[index].driver_data; in sfi_cpufreq_target()
62 rdmsr_on_cpu(policy->cpu, MSR_IA32_PERF_CTL, &lo, &hi); in sfi_cpufreq_target()
66 wrmsr_on_cpu(policy->cpu, MSR_IA32_PERF_CTL, lo, hi); in sfi_cpufreq_target()
71 static int sfi_cpufreq_cpu_init(struct cpufreq_policy *policy) in sfi_cpufreq_cpu_init() argument
73 policy->shared_type = CPUFREQ_SHARED_TYPE_HW; in sfi_cpufreq_cpu_init()
74 policy->cpuinfo.transition_latency = 100000; /* 100us */ in sfi_cpufreq_cpu_init()
76 return cpufreq_table_validate_and_show(policy, freq_table); in sfi_cpufreq_cpu_init()
Dcpufreq_governor.h84 (struct cpufreq_policy *policy, char *buf) \
86 struct dbs_data *dbs_data = policy->governor_data; \
100 (struct cpufreq_policy *policy, const char *buf, size_t count) \
102 struct dbs_data *dbs_data = policy->governor_data; \
133 struct cpufreq_policy *policy; member
239 unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy,
241 void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq);
264 (struct cpufreq_policy *policy, char *buf) \
266 struct dbs_data *dbs_data = policy->governor_data; \
273 int cpufreq_governor_dbs(struct cpufreq_policy *policy,
[all …]
Darm_big_little.c209 static int bL_cpufreq_set_target(struct cpufreq_policy *policy, in bL_cpufreq_set_target() argument
212 u32 cpu = policy->cpu, cur_cluster, new_cluster, actual_cluster; in bL_cpufreq_set_target()
443 static int bL_cpufreq_init(struct cpufreq_policy *policy) in bL_cpufreq_init() argument
445 u32 cur_cluster = cpu_to_cluster(policy->cpu); in bL_cpufreq_init()
449 cpu_dev = get_cpu_device(policy->cpu); in bL_cpufreq_init()
452 policy->cpu); in bL_cpufreq_init()
460 ret = cpufreq_table_validate_and_show(policy, freq_table[cur_cluster]); in bL_cpufreq_init()
463 policy->cpu, cur_cluster); in bL_cpufreq_init()
471 cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu)); in bL_cpufreq_init()
473 for_each_cpu(cpu, policy->cpus) in bL_cpufreq_init()
[all …]
Dloongson2_cpufreq.c48 static int loongson2_cpufreq_target(struct cpufreq_policy *policy, in loongson2_cpufreq_target() argument
51 unsigned int cpu = policy->cpu; in loongson2_cpufreq_target()
65 clk_set_rate(policy->clk, freq * 1000); in loongson2_cpufreq_target()
70 static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) in loongson2_cpufreq_cpu_init() argument
101 policy->clk = cpuclk; in loongson2_cpufreq_cpu_init()
102 return cpufreq_generic_init(policy, &loongson2_clockmod_table[0], 0); in loongson2_cpufreq_cpu_init()
105 static int loongson2_cpufreq_exit(struct cpufreq_policy *policy) in loongson2_cpufreq_exit() argument
107 clk_put(policy->clk); in loongson2_cpufreq_exit()
Dpasemi-cpufreq.c137 static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) in pas_cpufreq_cpu_init() argument
147 cpu = of_get_cpu_node(policy->cpu, NULL); in pas_cpufreq_cpu_init()
186 pr_debug("init cpufreq on CPU %d\n", policy->cpu); in pas_cpufreq_cpu_init()
206 cur_astate = get_cur_astate(policy->cpu); in pas_cpufreq_cpu_init()
209 policy->cur = pas_freqs[cur_astate].frequency; in pas_cpufreq_cpu_init()
210 ppc_proc_freq = policy->cur * 1000ul; in pas_cpufreq_cpu_init()
212 return cpufreq_generic_init(policy, pas_freqs, get_gizmo_latency()); in pas_cpufreq_cpu_init()
223 static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) in pas_cpufreq_cpu_exit() argument
240 static int pas_cpufreq_target(struct cpufreq_policy *policy, in pas_cpufreq_target() argument
246 policy->cpu, in pas_cpufreq_target()
Dpowernow-k6.c139 static int powernow_k6_target(struct cpufreq_policy *policy, in powernow_k6_target() argument
153 static int powernow_k6_cpu_init(struct cpufreq_policy *policy) in powernow_k6_cpu_init() argument
159 if (policy->cpu != 0) in powernow_k6_cpu_init()
214 policy->cpuinfo.transition_latency = 500000; in powernow_k6_cpu_init()
216 return cpufreq_table_validate_and_show(policy, clock_ratio); in powernow_k6_cpu_init()
220 static int powernow_k6_cpu_exit(struct cpufreq_policy *policy) in powernow_k6_cpu_exit() argument
228 freqs.old = policy->cur; in powernow_k6_cpu_exit()
232 cpufreq_freq_transition_begin(policy, &freqs); in powernow_k6_cpu_exit()
233 powernow_k6_target(policy, i); in powernow_k6_cpu_exit()
234 cpufreq_freq_transition_end(policy, &freqs, 0); in powernow_k6_cpu_exit()
Dls1x-cpufreq.c46 static int ls1x_cpufreq_target(struct cpufreq_policy *policy, in ls1x_cpufreq_target() argument
51 old_freq = policy->cur; in ls1x_cpufreq_target()
52 new_freq = policy->freq_table[index].frequency; in ls1x_cpufreq_target()
64 clk_set_parent(policy->clk, ls1x_cpufreq.osc_clk); in ls1x_cpufreq_target()
70 clk_set_parent(policy->clk, ls1x_cpufreq.mux_clk); in ls1x_cpufreq_target()
75 static int ls1x_cpufreq_init(struct cpufreq_policy *policy) in ls1x_cpufreq_init() argument
105 policy->clk = ls1x_cpufreq.clk; in ls1x_cpufreq_init()
106 ret = cpufreq_generic_init(policy, freq_tbl, 0); in ls1x_cpufreq_init()
113 static int ls1x_cpufreq_exit(struct cpufreq_policy *policy) in ls1x_cpufreq_exit() argument
115 kfree(policy->freq_table); in ls1x_cpufreq_exit()
Dsparc-us3-cpufreq.c96 static int us3_freq_target(struct cpufreq_policy *policy, unsigned int index) in us3_freq_target() argument
98 unsigned int cpu = policy->cpu; in us3_freq_target()
135 static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) in us3_freq_cpu_init() argument
137 unsigned int cpu = policy->cpu; in us3_freq_cpu_init()
151 policy->cpuinfo.transition_latency = 0; in us3_freq_cpu_init()
152 policy->cur = clock_tick; in us3_freq_cpu_init()
154 return cpufreq_table_validate_and_show(policy, table); in us3_freq_cpu_init()
157 static int us3_freq_cpu_exit(struct cpufreq_policy *policy) in us3_freq_cpu_exit() argument
160 us3_freq_target(policy, 0); in us3_freq_cpu_exit()
Dpowernv-cpufreq.c170 static ssize_t cpuinfo_nominal_freq_show(struct cpufreq_policy *policy, in cpuinfo_nominal_freq_show() argument
368 static int powernv_cpufreq_target_index(struct cpufreq_policy *policy, in powernv_cpufreq_target_index() argument
386 smp_call_function_any(policy->cpus, set_pstate, &freq_data, 1); in powernv_cpufreq_target_index()
391 static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) in powernv_cpufreq_cpu_init() argument
395 base = cpu_first_thread_sibling(policy->cpu); in powernv_cpufreq_cpu_init()
398 cpumask_set_cpu(base + i, policy->cpus); in powernv_cpufreq_cpu_init()
400 return cpufreq_table_validate_and_show(policy, powernv_freqs); in powernv_cpufreq_cpu_init()
438 struct cpufreq_policy policy; in powernv_cpufreq_work_fn() local
440 cpufreq_get_policy(&policy, cpu); in powernv_cpufreq_work_fn()
441 cpufreq_frequency_table_target(&policy, policy.freq_table, in powernv_cpufreq_work_fn()
[all …]
Dintel_pstate.c1019 #define ICPU(model, policy) \ argument
1021 (unsigned long)&policy }
1100 static int intel_pstate_set_policy(struct cpufreq_policy *policy) in intel_pstate_set_policy() argument
1102 if (!policy->cpuinfo.max_freq) in intel_pstate_set_policy()
1105 if (policy->policy == CPUFREQ_POLICY_PERFORMANCE && in intel_pstate_set_policy()
1106 policy->max >= policy->cpuinfo.max_freq) { in intel_pstate_set_policy()
1116 limits->min_policy_pct = (policy->min * 100) / policy->cpuinfo.max_freq; in intel_pstate_set_policy()
1118 limits->max_policy_pct = DIV_ROUND_UP(policy->max * 100, in intel_pstate_set_policy()
1119 policy->cpuinfo.max_freq); in intel_pstate_set_policy()
1147 static int intel_pstate_verify_policy(struct cpufreq_policy *policy) in intel_pstate_verify_policy() argument
[all …]
De_powersaver.c78 static int eps_acpi_exit(struct cpufreq_policy *policy) in eps_acpi_exit() argument
107 struct cpufreq_policy *policy, in eps_set_state() argument
154 static int eps_target(struct cpufreq_policy *policy, unsigned int index) in eps_target() argument
157 unsigned int cpu = policy->cpu; in eps_target()
167 ret = eps_set_state(centaur, policy, dest_state); in eps_target()
173 static int eps_cpu_init(struct cpufreq_policy *policy) in eps_cpu_init() argument
193 if (policy->cpu != 0) in eps_cpu_init()
299 if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) { in eps_cpu_init()
303 eps_acpi_exit(policy); in eps_cpu_init()
369 policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ in eps_cpu_init()
[all …]
Dcpufreq_performance.c19 static int cpufreq_governor_performance(struct cpufreq_policy *policy, in cpufreq_governor_performance() argument
26 policy->max, event); in cpufreq_governor_performance()
27 __cpufreq_driver_target(policy, policy->max, in cpufreq_governor_performance()
Dcpufreq_powersave.c19 static int cpufreq_governor_powersave(struct cpufreq_policy *policy, in cpufreq_governor_powersave() argument
26 policy->min, event); in cpufreq_governor_powersave()
27 __cpufreq_driver_target(policy, policy->min, in cpufreq_governor_powersave()
Ds3c24xx-cpufreq.c153 static int s3c_cpufreq_settarget(struct cpufreq_policy *policy, in s3c_cpufreq_settarget() argument
215 cpufreq_freq_transition_begin(policy, &freqs.freqs); in s3c_cpufreq_settarget()
259 cpufreq_freq_transition_end(policy, &freqs.freqs, 0); in s3c_cpufreq_settarget()
275 static int s3c_cpufreq_target(struct cpufreq_policy *policy, in s3c_cpufreq_target() argument
291 __func__, policy, target_freq, relation); in s3c_cpufreq_target()
294 if (cpufreq_frequency_table_target(policy, ftab, in s3c_cpufreq_target()
321 tmp_policy.min = policy->min * 1000; in s3c_cpufreq_target()
322 tmp_policy.max = policy->max * 1000; in s3c_cpufreq_target()
323 tmp_policy.cpu = policy->cpu; in s3c_cpufreq_target()
346 return s3c_cpufreq_settarget(policy, target_freq, pll); in s3c_cpufreq_target()
[all …]
Dpcc-cpufreq.c112 static int pcc_cpufreq_verify(struct cpufreq_policy *policy) in pcc_cpufreq_verify() argument
114 cpufreq_verify_within_cpu_limits(policy); in pcc_cpufreq_verify()
197 static int pcc_cpufreq_target(struct cpufreq_policy *policy, in pcc_cpufreq_target() argument
207 cpu = policy->cpu; in pcc_cpufreq_target()
215 freqs.old = policy->cur; in pcc_cpufreq_target()
217 cpufreq_freq_transition_begin(policy, &freqs); in pcc_cpufreq_target()
234 cpufreq_freq_transition_end(policy, &freqs, status != CMD_COMPLETE); in pcc_cpufreq_target()
537 static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) in pcc_cpufreq_cpu_init() argument
539 unsigned int cpu = policy->cpu; in pcc_cpufreq_cpu_init()
553 policy->max = policy->cpuinfo.max_freq = in pcc_cpufreq_cpu_init()
[all …]
Dsparc-us2e-cpufreq.c248 static int us2e_freq_target(struct cpufreq_policy *policy, unsigned int index) in us2e_freq_target() argument
250 unsigned int cpu = policy->cpu; in us2e_freq_target()
276 static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) in us2e_freq_cpu_init() argument
278 unsigned int cpu = policy->cpu; in us2e_freq_cpu_init()
296 policy->cpuinfo.transition_latency = 0; in us2e_freq_cpu_init()
297 policy->cur = clock_tick; in us2e_freq_cpu_init()
299 return cpufreq_table_validate_and_show(policy, table); in us2e_freq_cpu_init()
302 static int us2e_freq_cpu_exit(struct cpufreq_policy *policy) in us2e_freq_cpu_exit() argument
305 us2e_freq_target(policy, 0); in us2e_freq_cpu_exit()
Dblackfin-cpufreq.c130 static int bfin_target(struct cpufreq_policy *policy, unsigned int index) in bfin_target() argument
151 ret = cpu_set_cclk(policy->cpu, new_freq * 1000); in bfin_target()
177 static int __bfin_cpu_init(struct cpufreq_policy *policy) in __bfin_cpu_init() argument
185 if (policy->cpu == CPUFREQ_CPU) in __bfin_cpu_init()
188 policy->cpuinfo.transition_latency = 50000; /* 50us assumed */ in __bfin_cpu_init()
190 return cpufreq_table_validate_and_show(policy, bfin_freq_table); in __bfin_cpu_init()
Ddbx500-cpufreq.c22 static int dbx500_cpufreq_target(struct cpufreq_policy *policy, in dbx500_cpufreq_target() argument
29 static int dbx500_cpufreq_init(struct cpufreq_policy *policy) in dbx500_cpufreq_init() argument
31 policy->clk = armss_clk; in dbx500_cpufreq_init()
32 return cpufreq_generic_init(policy, freq_table, 20 * 1000); in dbx500_cpufreq_init()
Dsc520_freq.c56 static int sc520_freq_target(struct cpufreq_policy *policy, unsigned int state) in sc520_freq_target() argument
75 static int sc520_freq_cpu_init(struct cpufreq_policy *policy) in sc520_freq_cpu_init() argument
85 policy->cpuinfo.transition_latency = 1000000; /* 1ms */ in sc520_freq_cpu_init()
87 return cpufreq_table_validate_and_show(policy, sc520_freq_table); in sc520_freq_cpu_init()
Dexynos5440-cpufreq.c211 static int exynos_target(struct cpufreq_policy *policy, unsigned int index) in exynos_target() argument
219 freqs.old = policy->cur; in exynos_target()
222 cpufreq_freq_transition_begin(policy, &freqs); in exynos_target()
225 for_each_cpu(i, policy->cpus) { in exynos_target()
239 struct cpufreq_policy *policy = cpufreq_cpu_get(0); /* boot CPU */ in exynos_cpufreq_work() local
247 freqs.old = policy->cur; in exynos_cpufreq_work()
261 cpufreq_freq_transition_end(policy, &freqs, 0); in exynos_cpufreq_work()
263 cpufreq_cpu_put(policy); in exynos_cpufreq_work()
301 static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) in exynos_cpufreq_cpu_init() argument
303 policy->clk = dvfs_info->cpu_clk; in exynos_cpufreq_cpu_init()
[all …]
Ds5pv210-cpufreq.c224 static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index) in s5pv210_target() argument
243 old_freq = policy->cur; in s5pv210_target()
247 if (cpufreq_frequency_table_target(policy, s5pv210_freq_table, in s5pv210_target()
504 static int s5pv210_cpu_init(struct cpufreq_policy *policy) in s5pv210_cpu_init() argument
509 policy->clk = clk_get(NULL, "armclk"); in s5pv210_cpu_init()
510 if (IS_ERR(policy->clk)) in s5pv210_cpu_init()
511 return PTR_ERR(policy->clk); in s5pv210_cpu_init()
525 if (policy->cpu != 0) { in s5pv210_cpu_init()
549 policy->suspend_freq = SLEEP_FREQ; in s5pv210_cpu_init()
550 return cpufreq_generic_init(policy, s5pv210_freq_table, 40000); in s5pv210_cpu_init()
[all …]
Dppc_cbe_cpufreq_pmi.c96 struct cpufreq_policy *policy = data; in pmi_notifier() local
106 cbe_freqs = cpufreq_frequency_get_table(policy->cpu); in pmi_notifier()
107 node = cbe_cpu_to_node(policy->cpu); in pmi_notifier()
115 cpufreq_verify_within_limits(policy, 0, in pmi_notifier()
Delanfreq.c108 static int elanfreq_target(struct cpufreq_policy *policy, in elanfreq_target() argument
147 static int elanfreq_cpu_init(struct cpufreq_policy *policy) in elanfreq_cpu_init() argument
167 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; in elanfreq_cpu_init()
169 return cpufreq_table_validate_and_show(policy, elanfreq_table); in elanfreq_cpu_init()
Dspeedstep-smi.c222 static int speedstep_target(struct cpufreq_policy *policy, unsigned int index) in speedstep_target() argument
230 static int speedstep_cpu_init(struct cpufreq_policy *policy) in speedstep_cpu_init() argument
236 if (policy->cpu != 0) in speedstep_cpu_init()
268 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; in speedstep_cpu_init()
269 return cpufreq_table_validate_and_show(policy, speedstep_freqs); in speedstep_cpu_init()
280 static int speedstep_resume(struct cpufreq_policy *policy) in speedstep_resume() argument
Dpmac32-cpufreq.c334 static int do_set_cpu_speed(struct cpufreq_policy *policy, int speed_mode) in do_set_cpu_speed() argument
364 static int pmac_cpufreq_target( struct cpufreq_policy *policy, in pmac_cpufreq_target() argument
369 rc = do_set_cpu_speed(policy, index); in pmac_cpufreq_target()
375 static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) in pmac_cpufreq_cpu_init() argument
377 return cpufreq_generic_init(policy, pmac_cpu_freqs, transition_latency); in pmac_cpufreq_cpu_init()
399 static int pmac_cpufreq_suspend(struct cpufreq_policy *policy) in pmac_cpufreq_suspend() argument
411 do_set_cpu_speed(policy, CPUFREQ_HIGH); in pmac_cpufreq_suspend()
415 static int pmac_cpufreq_resume(struct cpufreq_policy *policy) in pmac_cpufreq_resume() argument
427 do_set_cpu_speed(policy, sleep_freq == low_freq ? in pmac_cpufreq_resume()
Dpxa2xx-cpufreq.c270 static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) in pxa_set_target() argument
290 if (vcc_core && new_freq_cpu > policy->cur) { in pxa_set_target()
353 if (vcc_core && new_freq_cpu < policy->cur) in pxa_set_target()
359 static int pxa_cpufreq_init(struct cpufreq_policy *policy) in pxa_cpufreq_init() argument
375 policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ in pxa_cpufreq_init()
414 cpufreq_table_validate_and_show(policy, pxa255_freq_table); in pxa_cpufreq_init()
417 cpufreq_table_validate_and_show(policy, pxa27x_freq_table); in pxa_cpufreq_init()
Dlonghaul.c245 static int longhaul_setstate(struct cpufreq_policy *policy, in longhaul_setstate() argument
629 static int longhaul_target(struct cpufreq_policy *policy, in longhaul_target() argument
638 retval = longhaul_setstate(policy, table_index); in longhaul_target()
653 retval = longhaul_setstate(policy, i); in longhaul_target()
662 retval = longhaul_setstate(policy, table_index); in longhaul_target()
771 static int longhaul_cpu_init(struct cpufreq_policy *policy) in longhaul_cpu_init() argument
909 policy->cpuinfo.transition_latency = 200000; /* nsec */ in longhaul_cpu_init()
911 return cpufreq_table_validate_and_show(policy, longhaul_table); in longhaul_cpu_init()
969 struct cpufreq_policy *policy = cpufreq_cpu_get(0); in longhaul_exit() local
976 freqs.old = policy->cur; in longhaul_exit()
[all …]
Dcris-artpec3-cpufreq.c30 static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) in cris_freq_target() argument
50 static int cris_freq_cpu_init(struct cpufreq_policy *policy) in cris_freq_cpu_init() argument
52 return cpufreq_generic_init(policy, cris_freq_table, 1000000); in cris_freq_cpu_init()
Dcris-etraxfs-cpufreq.c30 static int cris_freq_target(struct cpufreq_policy *policy, unsigned int state) in cris_freq_target() argument
50 static int cris_freq_cpu_init(struct cpufreq_policy *policy) in cris_freq_cpu_init() argument
52 return cpufreq_generic_init(policy, cris_freq_table, 1000000); in cris_freq_cpu_init()
Dsa1100-cpufreq.c180 static int sa1100_target(struct cpufreq_policy *policy, unsigned int ppcr) in sa1100_target() argument
198 static int __init sa1100_cpu_init(struct cpufreq_policy *policy) in sa1100_cpu_init() argument
200 return cpufreq_generic_init(policy, sa11x0_freq_table, CPUFREQ_ETERNAL); in sa1100_cpu_init()
Dspear-cpufreq.c103 static int spear_cpufreq_target(struct cpufreq_policy *policy, in spear_cpufreq_target() argument
153 static int spear_cpufreq_init(struct cpufreq_policy *policy) in spear_cpufreq_init() argument
155 policy->clk = spear_cpufreq.clk; in spear_cpufreq_init()
156 return cpufreq_generic_init(policy, spear_cpufreq.freq_tbl, in spear_cpufreq_init()
Ds3c2416-cpufreq.c219 static int s3c2416_cpufreq_set_target(struct cpufreq_policy *policy, in s3c2416_cpufreq_set_target() argument
336 static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) in s3c2416_cpufreq_driver_init() argument
344 if (policy->cpu != 0) in s3c2416_cpufreq_driver_init()
364 policy->cpuinfo.max_freq = 400000; in s3c2416_cpufreq_driver_init()
369 policy->cpuinfo.max_freq = 534000; in s3c2416_cpufreq_driver_init()
454 ret = cpufreq_generic_init(policy, s3c_freq->freq_table, in s3c2416_cpufreq_driver_init()
Dmaple-cpufreq.c131 static int maple_cpufreq_target(struct cpufreq_policy *policy, in maple_cpufreq_target() argument
142 static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy) in maple_cpufreq_cpu_init() argument
144 return cpufreq_generic_init(policy, maple_cpu_freqs, 12000); in maple_cpufreq_cpu_init()
Dkirkwood-cpufreq.c54 static int kirkwood_cpufreq_target(struct cpufreq_policy *policy, in kirkwood_cpufreq_target() argument
90 static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy) in kirkwood_cpufreq_cpu_init() argument
92 return cpufreq_generic_init(policy, kirkwood_freq_table, 5000); in kirkwood_cpufreq_cpu_init()
Dsa1110-cpufreq.c232 static int sa1110_target(struct cpufreq_policy *policy, unsigned int ppcr) in sa1110_target() argument
247 if (policy->max < 147500) { in sa1110_target()
307 static int __init sa1110_cpu_init(struct cpufreq_policy *policy) in sa1110_cpu_init() argument
309 return cpufreq_generic_init(policy, sa11x0_freq_table, CPUFREQ_ETERNAL); in sa1110_cpu_init()
Dpowernow-k7.c250 static int powernow_target(struct cpufreq_policy *policy, unsigned int index) in powernow_target() argument
605 static int powernow_cpu_init(struct cpufreq_policy *policy) in powernow_cpu_init() argument
610 if (policy->cpu != 0) in powernow_cpu_init()
654 policy->cpuinfo.transition_latency = in powernow_cpu_init()
657 return cpufreq_table_validate_and_show(policy, powernow_table); in powernow_cpu_init()
660 static int powernow_cpu_exit(struct cpufreq_policy *policy) in powernow_cpu_exit() argument
Dimx6q-cpufreq.c45 static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) in imx6q_set_target() argument
163 static int imx6q_cpufreq_init(struct cpufreq_policy *policy) in imx6q_cpufreq_init() argument
165 policy->clk = arm_clk; in imx6q_cpufreq_init()
166 return cpufreq_generic_init(policy, freq_table, transition_latency); in imx6q_cpufreq_init()
Dpmac64-cpufreq.c313 static int g5_cpufreq_target(struct cpufreq_policy *policy, unsigned int index) in g5_cpufreq_target() argument
323 static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) in g5_cpufreq_cpu_init() argument
325 return cpufreq_generic_init(policy, g5_cpu_freqs, transition_latency); in g5_cpufreq_cpu_init()
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/
Dnrs.c58 static int nrs_policy_init(struct ptlrpc_nrs_policy *policy) in nrs_policy_init() argument
60 return policy->pol_desc->pd_ops->op_policy_init != NULL ? in nrs_policy_init()
61 policy->pol_desc->pd_ops->op_policy_init(policy) : 0; in nrs_policy_init()
64 static void nrs_policy_fini(struct ptlrpc_nrs_policy *policy) in nrs_policy_fini() argument
66 LASSERT(policy->pol_ref == 0); in nrs_policy_fini()
67 LASSERT(policy->pol_req_queued == 0); in nrs_policy_fini()
69 if (policy->pol_desc->pd_ops->op_policy_fini != NULL) in nrs_policy_fini()
70 policy->pol_desc->pd_ops->op_policy_fini(policy); in nrs_policy_fini()
73 static int nrs_policy_ctl_locked(struct ptlrpc_nrs_policy *policy, in nrs_policy_ctl_locked() argument
82 if (policy->pol_state == NRS_POL_STATE_STOPPED) in nrs_policy_ctl_locked()
[all …]
Dnrs_fifo.c79 static int nrs_fifo_start(struct ptlrpc_nrs_policy *policy) in nrs_fifo_start() argument
84 cfs_cpt_spread_node(nrs_pol2cptab(policy), in nrs_fifo_start()
85 nrs_pol2cptid(policy))); in nrs_fifo_start()
90 policy->pol_private = head; in nrs_fifo_start()
103 static void nrs_fifo_stop(struct ptlrpc_nrs_policy *policy) in nrs_fifo_stop() argument
105 struct nrs_fifo_head *head = policy->pol_private; in nrs_fifo_stop()
131 static int nrs_fifo_res_get(struct ptlrpc_nrs_policy *policy, in nrs_fifo_res_get() argument
140 *resp = &((struct nrs_fifo_head *)policy->pol_private)->fh_res; in nrs_fifo_res_get()
162 struct ptlrpc_nrs_request *nrs_fifo_req_get(struct ptlrpc_nrs_policy *policy, in nrs_fifo_req_get() argument
165 struct nrs_fifo_head *head = policy->pol_private; in nrs_fifo_req_get()
[all …]
Dsec.c66 int sptlrpc_register_policy(struct ptlrpc_sec_policy *policy) in sptlrpc_register_policy() argument
68 __u16 number = policy->sp_policy; in sptlrpc_register_policy()
70 LASSERT(policy->sp_name); in sptlrpc_register_policy()
71 LASSERT(policy->sp_cops); in sptlrpc_register_policy()
72 LASSERT(policy->sp_sops); in sptlrpc_register_policy()
82 policies[number] = policy; in sptlrpc_register_policy()
85 CDEBUG(D_SEC, "%s: registered\n", policy->sp_name); in sptlrpc_register_policy()
90 int sptlrpc_unregister_policy(struct ptlrpc_sec_policy *policy) in sptlrpc_unregister_policy() argument
92 __u16 number = policy->sp_policy; in sptlrpc_unregister_policy()
99 CERROR("%s: already unregistered\n", policy->sp_name); in sptlrpc_unregister_policy()
[all …]
Dptlrpc_internal.h170 static inline int nrs_pol2cptid(const struct ptlrpc_nrs_policy *policy) in nrs_pol2cptid() argument
172 return policy->pol_nrs->nrs_svcpt->scp_cpt; in nrs_pol2cptid()
176 struct ptlrpc_service *nrs_pol2svc(struct ptlrpc_nrs_policy *policy) in nrs_pol2svc() argument
178 return policy->pol_nrs->nrs_svcpt->scp_service; in nrs_pol2svc()
182 struct ptlrpc_service_part *nrs_pol2svcpt(struct ptlrpc_nrs_policy *policy) in nrs_pol2svcpt() argument
184 return policy->pol_nrs->nrs_svcpt; in nrs_pol2svcpt()
188 struct cfs_cpt_table *nrs_pol2cptab(struct ptlrpc_nrs_policy *policy) in nrs_pol2cptab() argument
190 return nrs_pol2svc(policy)->srv_cptable; in nrs_pol2cptab()
Dlproc_ptlrpc.c456 static void nrs_policy_get_info_locked(struct ptlrpc_nrs_policy *policy, in nrs_policy_get_info_locked() argument
459 LASSERT(policy != NULL); in nrs_policy_get_info_locked()
461 assert_spin_locked(&policy->pol_nrs->nrs_lock); in nrs_policy_get_info_locked()
463 memcpy(info->pi_name, policy->pol_desc->pd_name, NRS_POL_NAME_MAX); in nrs_policy_get_info_locked()
465 info->pi_fallback = !!(policy->pol_flags & PTLRPC_NRS_FL_FALLBACK); in nrs_policy_get_info_locked()
466 info->pi_state = policy->pol_state; in nrs_policy_get_info_locked()
471 info->pi_req_queued = policy->pol_req_queued; in nrs_policy_get_info_locked()
472 info->pi_req_started = policy->pol_req_started; in nrs_policy_get_info_locked()
484 struct ptlrpc_nrs_policy *policy; in ptlrpc_lprocfs_nrs_seq_show() local
523 list_for_each_entry(policy, &nrs->nrs_policy_list, in ptlrpc_lprocfs_nrs_seq_show()
[all …]
/linux-4.4.14/include/linux/
Dcpufreq.h79 unsigned int policy; /* see above */ member
132 void cpufreq_cpu_put(struct cpufreq_policy *policy);
142 static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } in cpufreq_cpu_put() argument
145 static inline bool policy_is_shared(struct cpufreq_policy *policy) in policy_is_shared() argument
147 return cpumask_weight(policy->cpus) > 1; in policy_is_shared()
160 int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
163 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy);
229 int (*init)(struct cpufreq_policy *policy);
230 int (*verify)(struct cpufreq_policy *policy);
233 int (*setpolicy)(struct cpufreq_policy *policy);
[all …]
Dioprio.h64 if (task->policy == SCHED_IDLE) in task_nice_ioclass()
66 else if (task->policy == SCHED_FIFO || task->policy == SCHED_RR) in task_nice_ioclass()
Dblk-mq.h172 #define BLK_ALLOC_POLICY_TO_MQ_FLAG(policy) \ argument
173 ((policy & ((1 << BLK_MQ_F_ALLOC_POLICY_BITS) - 1)) \
Dshmem_fs.h19 struct shared_policy policy; /* NUMA memory alloc policy */ member
/linux-4.4.14/fs/f2fs/
Dcrypto_policy.c33 struct inode *inode, const struct f2fs_encryption_policy *policy) in f2fs_is_encryption_context_consistent_with_policy() argument
43 return (memcmp(ctx.master_key_descriptor, policy->master_key_descriptor, in f2fs_is_encryption_context_consistent_with_policy()
45 (ctx.flags == policy->flags) && in f2fs_is_encryption_context_consistent_with_policy()
47 policy->contents_encryption_mode) && in f2fs_is_encryption_context_consistent_with_policy()
49 policy->filenames_encryption_mode)); in f2fs_is_encryption_context_consistent_with_policy()
53 struct inode *inode, const struct f2fs_encryption_policy *policy) in f2fs_create_encryption_context_from_policy() argument
58 memcpy(ctx.master_key_descriptor, policy->master_key_descriptor, in f2fs_create_encryption_context_from_policy()
61 if (!f2fs_valid_contents_enc_mode(policy->contents_encryption_mode)) { in f2fs_create_encryption_context_from_policy()
64 policy->contents_encryption_mode); in f2fs_create_encryption_context_from_policy()
68 if (!f2fs_valid_filenames_enc_mode(policy->filenames_encryption_mode)) { in f2fs_create_encryption_context_from_policy()
[all …]
Dsegment.h524 unsigned int policy = SM_I(sbi)->ipu_policy; in need_inplace_update() local
530 if (policy & (0x1 << F2FS_IPU_FORCE)) in need_inplace_update()
532 if (policy & (0x1 << F2FS_IPU_SSR) && need_SSR(sbi)) in need_inplace_update()
534 if (policy & (0x1 << F2FS_IPU_UTIL) && in need_inplace_update()
537 if (policy & (0x1 << F2FS_IPU_SSR_UTIL) && need_SSR(sbi) && in need_inplace_update()
542 if (policy & (0x1 << F2FS_IPU_FSYNC) && in need_inplace_update()
/linux-4.4.14/fs/ext4/
Dcrypto_policy.c31 struct inode *inode, const struct ext4_encryption_policy *policy) in ext4_is_encryption_context_consistent_with_policy() argument
39 return (memcmp(ctx.master_key_descriptor, policy->master_key_descriptor, in ext4_is_encryption_context_consistent_with_policy()
42 policy->flags) && in ext4_is_encryption_context_consistent_with_policy()
44 policy->contents_encryption_mode) && in ext4_is_encryption_context_consistent_with_policy()
46 policy->filenames_encryption_mode)); in ext4_is_encryption_context_consistent_with_policy()
50 struct inode *inode, const struct ext4_encryption_policy *policy) in ext4_create_encryption_context_from_policy() argument
61 memcpy(ctx.master_key_descriptor, policy->master_key_descriptor, in ext4_create_encryption_context_from_policy()
63 if (!ext4_valid_contents_enc_mode(policy->contents_encryption_mode)) { in ext4_create_encryption_context_from_policy()
66 policy->contents_encryption_mode); in ext4_create_encryption_context_from_policy()
69 if (!ext4_valid_filenames_enc_mode(policy->filenames_encryption_mode)) { in ext4_create_encryption_context_from_policy()
[all …]
Dioctl.c622 struct ext4_encryption_policy policy; in ext4_ioctl() local
625 if (copy_from_user(&policy, in ext4_ioctl()
627 sizeof(policy))) { in ext4_ioctl()
632 err = ext4_process_policy(&policy, inode); in ext4_ioctl()
677 struct ext4_encryption_policy policy; in ext4_ioctl() local
682 err = ext4_get_policy(inode, &policy); in ext4_ioctl()
685 if (copy_to_user((void __user *)arg, &policy, sizeof(policy))) in ext4_ioctl()
/linux-4.4.14/drivers/hwtracing/stm/
Dpolicy.c39 struct stp_policy *policy; member
105 stm = policy_node->policy->stm; in stp_policy_node_masters_store()
153 stm = policy_node->policy->stm; in stp_policy_node_channels_store()
198 struct stp_policy *policy; in stp_policy_node_make() local
201 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make()
205 policy = parent_node->policy; in stp_policy_node_make()
208 if (!policy->stm) in stp_policy_node_make()
218 policy_node->policy = policy; in stp_policy_node_make()
221 policy_node->first_master = policy->stm->data->sw_start; in stp_policy_node_make()
222 policy_node->last_master = policy->stm->data->sw_end; in stp_policy_node_make()
[all …]
Dstm.h27 void stp_policy_unbind(struct stp_policy *policy);
43 struct stp_policy *policy; member
DMakefile3 stm_core-y := core.o policy.o
/linux-4.4.14/drivers/md/
Ddm-cache-policy-cleaner.c38 struct policy { struct
39 struct dm_cache_policy policy; member
66 static struct policy *to_policy(struct dm_cache_policy *p) in to_policy() argument
68 return container_of(p, struct policy, policy); in to_policy()
97 static int alloc_cache_blocks_with_hash(struct policy *p, dm_cblock_t cache_size) in alloc_cache_blocks_with_hash()
119 static void free_cache_blocks_and_hash(struct policy *p) in free_cache_blocks_and_hash()
125 static struct wb_cache_entry *alloc_cache_entry(struct policy *p) in alloc_cache_entry()
140 static struct wb_cache_entry *lookup_cache_entry(struct policy *p, dm_oblock_t oblock) in lookup_cache_entry()
159 static void insert_cache_hash_entry(struct policy *p, struct wb_cache_entry *e) in insert_cache_hash_entry()
177 struct policy *p = to_policy(pe); in wb_map()
[all …]
Ddm-cache-metadata.c1135 struct dm_cache_policy *policy) in policy_unchanged() argument
1137 const char *policy_name = dm_cache_policy_get_name(policy); in policy_unchanged()
1138 const unsigned *policy_version = dm_cache_policy_get_version(policy); in policy_unchanged()
1139 size_t policy_hint_size = dm_cache_policy_get_hint_size(policy); in policy_unchanged()
1168 struct dm_cache_policy *policy) in hints_array_available() argument
1170 return cmd->clean_when_opened && policy_unchanged(cmd, policy) && in hints_array_available()
1205 struct dm_cache_policy *policy, in __load_mappings() argument
1215 thunk.hints_valid = hints_array_available(cmd, policy); in __load_mappings()
1221 struct dm_cache_policy *policy, in dm_cache_load_mappings() argument
1227 r = __load_mappings(cmd, policy, fn, context); in dm_cache_load_mappings()
[all …]
Ddm-cache-policy-mq.c418 struct dm_cache_policy policy; member
980 return container_of(p, struct mq_policy, policy); in to_mq_policy()
1356 mq->policy.destroy = mq_destroy; in init_policy_functions()
1357 mq->policy.map = mq_map; in init_policy_functions()
1358 mq->policy.lookup = mq_lookup; in init_policy_functions()
1359 mq->policy.set_dirty = mq_set_dirty; in init_policy_functions()
1360 mq->policy.clear_dirty = mq_clear_dirty; in init_policy_functions()
1361 mq->policy.load_mapping = mq_load_mapping; in init_policy_functions()
1362 mq->policy.walk_mappings = mq_walk_mappings; in init_policy_functions()
1363 mq->policy.remove_mapping = mq_remove_mapping; in init_policy_functions()
[all …]
DMakefile14 dm-cache-y += dm-cache-target.o dm-cache-metadata.o dm-cache-policy.o
15 dm-cache-mq-y += dm-cache-policy-mq.o
16 dm-cache-smq-y += dm-cache-policy-smq.o
17 dm-cache-cleaner-y += dm-cache-policy-cleaner.o
Ddm-cache-policy-smq.c772 struct dm_cache_policy policy; member
1278 return container_of(p, struct smq_policy, policy); in to_smq_policy()
1573 mq->policy.destroy = smq_destroy; in init_policy_functions()
1574 mq->policy.map = smq_map; in init_policy_functions()
1575 mq->policy.lookup = smq_lookup; in init_policy_functions()
1576 mq->policy.set_dirty = smq_set_dirty; in init_policy_functions()
1577 mq->policy.clear_dirty = smq_clear_dirty; in init_policy_functions()
1578 mq->policy.load_mapping = smq_load_mapping; in init_policy_functions()
1579 mq->policy.walk_mappings = smq_walk_mappings; in init_policy_functions()
1580 mq->policy.remove_mapping = smq_remove_mapping; in init_policy_functions()
[all …]
Ddm-cache-target.c311 struct dm_cache_policy *policy; member
584 policy_set_dirty(cache->policy, oblock); in set_dirty()
591 policy_clear_dirty(cache->policy, oblock); in clear_dirty()
1140 policy_force_mapping(cache->policy, mg->new_oblock, mg->old_oblock); in migration_failure()
1147 policy_remove_mapping(cache->policy, mg->new_oblock); in migration_failure()
1172 policy_force_mapping(cache->policy, mg->new_oblock, in migration_success_pre_commit()
1185 policy_remove_mapping(cache->policy, mg->new_oblock); in migration_success_pre_commit()
1219 policy_remove_mapping(cache->policy, mg->old_oblock); in migration_success_post_commit()
1817 r = policy_map(cache->policy, block, true, can_migrate, fast_promotion, in process_cell()
2085 if (policy_writeback_work(cache->policy, &oblock, &cblock, busy)) in writeback_some_dirty_blocks()
[all …]
/linux-4.4.14/net/tipc/
Dnetlink.c74 .policy = tipc_nl_policy,
79 .policy = tipc_nl_policy,
85 .policy = tipc_nl_policy,
90 .policy = tipc_nl_policy,
95 .policy = tipc_nl_policy,
100 .policy = tipc_nl_policy,
106 .policy = tipc_nl_policy,
111 .policy = tipc_nl_policy,
116 .policy = tipc_nl_policy,
122 .policy = tipc_nl_policy,
[all …]
/linux-4.4.14/arch/powerpc/platforms/cell/
Dcpufreq_spudemand.c37 struct cpufreq_policy *policy; member
48 cpu = info->policy->cpu; in calc_freq()
55 return info->policy->max * info->busy_spus / FIXED_1; in calc_freq()
67 BUG_ON(info->policy == NULL); in spu_gov_work()
70 __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); in spu_gov_work()
73 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_work()
80 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_init_work()
88 static int spu_gov_govern(struct cpufreq_policy *policy, unsigned int event) in spu_gov_govern() argument
90 unsigned int cpu = policy->cpu; in spu_gov_govern()
105 if (!policy->cur) { in spu_gov_govern()
[all …]
/linux-4.4.14/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
Dima_policy1 What: security/ima/policy
9 the policy can be constrained based on LSM specific data.
10 Policies are loaded into the securityfs file ima/policy
12 then closing the file. The new policy takes effect after
13 the file ima/policy is closed.
40 default policy:
81 The default policy measures all executables in bprm_check,
84 policy appraises all files owned by root.
Dsysfs-fs-f2fs26 Controls the victim selection policy for garbage collection.
38 Controls the in-place-update policy.
/linux-4.4.14/Documentation/vm/
Dnuma_memory_policy.txt4 In the Linux kernel, "memory policy" determines from which node the kernel will
7 The current memory policy support was added to Linux 2.6 around May 2004. This
8 document attempts to describe the concepts and APIs of the 2.6 memory policy
23 The Linux kernel supports _scopes_ of memory policy, described here from
26 System Default Policy: this policy is "hard coded" into the kernel. It
27 is the policy that governs all page allocations that aren't controlled
28 by one of the more specific policy scopes discussed below. When the
29 system is "up and running", the system default policy will use "local
31 default policy will be set to interleave allocations across all nodes
35 Task/Process Policy: this is an optional, per-task policy. When defined
[all …]
Dhugetlbpage.txt91 over all the set of allowed nodes specified by the NUMA memory policy of the
93 task has default memory policy--is all on-line nodes with memory. Allowed
96 below of the interaction of task memory policy, cpusets and per node attributes
131 across all nodes in the memory policy of the task modifying nr_hugepages.
173 NUMA memory policy of the task that modifies the nr_hugepages_mempolicy
193 memory policy mode--bind, preferred, local or interleave--may be used. The
199 However, if a node in the policy does not contain sufficient contiguous
204 the task's memory policy.
206 2) One or more nodes may be specified with the bind or interleave policy.
207 If more than one node is specified with the preferred policy, only the
[all …]
/linux-4.4.14/Documentation/cpu-freq/
Dcpu-drivers.txt76 and/or policy is restored by a call to
94 *policy as argument. What to do now?
100 policy->cpuinfo.min_freq _and_
101 policy->cpuinfo.max_freq - the minimum and maximum frequency
104 policy->cpuinfo.transition_latency the time it takes on this CPU to
109 policy->cur The current operating frequency of
111 policy->min,
112 policy->max,
113 policy->policy and, if necessary,
114 policy->governor must contain the "default policy" for
[all …]
Dcore.txt33 policy changes (ex. thermal modules like ACPI) or of all
50 There are two different CPUFreq notifiers - policy notifiers and
54 2.1 CPUFreq policy notifiers
57 These are notified when a new policy is intended to be set. Each
58 CPUFreq policy notifier is called twice for a policy transition:
64 2.) And during CPUFREQ_NOTIFY all notifiers are informed of the new policy
65 - if two hardware drivers failed to agree on a new policy before this
72 consisting of five values: cpu, min, max, policy and max_cpu_freq. min
74 policy, policy the new policy, cpu the number of the affected CPU; and
113 cpufreq_frequency_table_cpuinfo(policy, freq_table);
Dgovernors.txt47 How to decide what frequency within the CPUfreq policy should be used?
63 "CPUfreq policy"
64 consists of frequency limits (policy->{min,max})
71 / the limits of policy->{min,max}
76 "policy" is set. to target_freq is set.
78 is within policy->{min,max}
238 policy->cpu
240 policy->cpu
241 CPUFREQ_GOV_LIMITS: The limits for CPU policy->cpu have changed to
242 policy->min and policy->max.
[all …]
Duser-guide.txt32 3. How to change the CPU cpufreq policy and/or speed
139 3. How to change the CPU cpufreq policy and/or speed
186 scaling_max_freq show the current "policy limits" (in
189 NOTE: when setting a policy you need to
/linux-4.4.14/security/tomoyo/
DMakefile3 targets += builtin-policy.h
6 …ree)/scripts/basic/bin2c <$(firstword $(wildcard $(obj)/policy/$(1).conf $(srctree)/$(src)/policy/…
12 $(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(src)/policy/*.conf.default) FORCE
13 $(call if_changed,policy)
15 $(obj)/common.o: $(obj)/builtin-policy.h
DKconfig24 that are automatically appended into policy at "learning mode".
42 bool "Activate without calling userspace policy loader."
47 policy was loaded. This option will be useful for systems where
49 needed before loading the policy. For example, you can activate
50 immediately after loading the fixed part of policy which will allow
52 variant part of policy and verifying (e.g. running GPG check) and
53 loading the variant part of policy. Since you can start using
58 string "Location of userspace policy loader"
63 This is the default pathname of policy loader which is called before
68 string "Trigger for calling userspace policy loader"
D.gitignore1 builtin-policy.h
2 policy/*.conf
/linux-4.4.14/tools/power/cpupower/lib/
Dcpufreq.c62 void cpufreq_put_policy(struct cpufreq_policy *policy) in cpufreq_put_policy() argument
64 if ((!policy) || (!policy->governor)) in cpufreq_put_policy()
67 free(policy->governor); in cpufreq_put_policy()
68 policy->governor = NULL; in cpufreq_put_policy()
69 free(policy); in cpufreq_put_policy()
150 int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy) in cpufreq_set_policy() argument
152 if (!policy || !(policy->governor)) in cpufreq_set_policy()
155 return sysfs_set_freq_policy(cpu, policy); in cpufreq_set_policy()
Dsysfs.c249 struct cpufreq_policy *policy; in sysfs_get_freq_policy() local
251 policy = malloc(sizeof(struct cpufreq_policy)); in sysfs_get_freq_policy()
252 if (!policy) in sysfs_get_freq_policy()
255 policy->governor = sysfs_cpufreq_get_one_string(cpu, SCALING_GOVERNOR); in sysfs_get_freq_policy()
256 if (!policy->governor) { in sysfs_get_freq_policy()
257 free(policy); in sysfs_get_freq_policy()
260 policy->min = sysfs_cpufreq_get_one_value(cpu, SCALING_MIN_FREQ); in sysfs_get_freq_policy()
261 policy->max = sysfs_cpufreq_get_one_value(cpu, SCALING_MAX_FREQ); in sysfs_get_freq_policy()
262 if ((!policy->min) || (!policy->max)) { in sysfs_get_freq_policy()
263 free(policy->governor); in sysfs_get_freq_policy()
[all …]
Dcpufreq.h121 extern void cpufreq_put_policy(struct cpufreq_policy *policy);
196 extern int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy);
Dsysfs.h24 struct cpufreq_policy *policy);
/linux-4.4.14/tools/power/cpupower/utils/
Dcpufreq-info.c58 struct cpufreq_policy *policy; in proc_cpufreq_output() local
67 policy = cpufreq_get_policy(cpu); in proc_cpufreq_output()
68 if (!policy) in proc_cpufreq_output()
74 min_pctg = (policy->min * 100) / max; in proc_cpufreq_output()
75 max_pctg = (policy->max * 100) / max; in proc_cpufreq_output()
78 cpu , policy->min, max ? min_pctg : 0, policy->max, in proc_cpufreq_output()
79 max ? max_pctg : 0, policy->governor); in proc_cpufreq_output()
81 cpufreq_put_policy(policy); in proc_cpufreq_output()
255 struct cpufreq_policy *policy; in debug_output_one() local
334 policy = cpufreq_get_policy(cpu); in debug_output_one()
[all …]
/linux-4.4.14/drivers/power/
Dwm8350_power.c90 struct wm8350_charger_policy *policy) in wm8350_charger_config() argument
94 if (!policy) { in wm8350_charger_config()
101 if (policy->fast_limit_USB_mA > 500) { in wm8350_charger_config()
106 eoc_mA = WM8350_CHG_EOC_mA(policy->eoc_mA); in wm8350_charger_config()
113 reg | eoc_mA | policy->trickle_start_mV | in wm8350_charger_config()
120 WM8350_CHG_FAST_LIMIT_mA(policy->fast_limit_USB_mA); in wm8350_charger_config()
122 policy->charge_mV | policy->trickle_charge_USB_mA | in wm8350_charger_config()
124 policy->charge_timeout)); in wm8350_charger_config()
128 WM8350_CHG_FAST_LIMIT_mA(policy->fast_limit_mA); in wm8350_charger_config()
130 policy->charge_mV | policy->trickle_charge_mA | in wm8350_charger_config()
[all …]
/linux-4.4.14/security/apparmor/
Dpolicy.c128 static bool policy_init(struct aa_policy *policy, const char *prefix, in policy_init() argument
133 policy->hname = kmalloc(strlen(prefix) + strlen(name) + 3, in policy_init()
135 if (policy->hname) in policy_init()
136 sprintf(policy->hname, "%s//%s", prefix, name); in policy_init()
138 policy->hname = kstrdup(name, GFP_KERNEL); in policy_init()
139 if (!policy->hname) in policy_init()
142 policy->name = (char *)hname_tail(policy->hname); in policy_init()
143 INIT_LIST_HEAD(&policy->list); in policy_init()
144 INIT_LIST_HEAD(&policy->profiles); in policy_init()
153 static void policy_destroy(struct aa_policy *policy) in policy_destroy() argument
[all …]
Dpolicy_unpack.c581 profile->policy.dfa = unpack_dfa(e); in unpack_profile()
582 if (IS_ERR(profile->policy.dfa)) { in unpack_profile()
583 error = PTR_ERR(profile->policy.dfa); in unpack_profile()
584 profile->policy.dfa = NULL; in unpack_profile()
587 if (!unpack_u32(e, &profile->policy.start[0], "start")) in unpack_profile()
589 profile->policy.start[0] = DFA_START; in unpack_profile()
592 profile->policy.start[i] = in unpack_profile()
593 aa_dfa_next(profile->policy.dfa, in unpack_profile()
594 profile->policy.start[0], in unpack_profile()
DMakefile6 path.o domain.o policy.o policy_unpack.o procattr.o lsm.o \
/linux-4.4.14/scripts/selinux/
Dinstall_policy.sh21 ./mdp policy.conf file_contexts
22 $CP -o policy.$VERS policy.conf
24 mkdir -p /etc/selinux/dummy/policy
29 cp policy.$VERS /etc/selinux/dummy/policy
DREADME2 installing a dummy SELinux policy.
/linux-4.4.14/Documentation/trace/
Dstm.txt23 To solve this mapping problem, stm class provides a policy management
25 identifiers to ranges of masters and channels. If these rules (policy)
29 This policy is a tree structure containing rules (policy_node) that
31 associated with it, located in "stp-policy" subsystem directory in
32 configfs. The topmost directory's name (the policy) is formatted as
33 the STM device name to which this policy applies and and arbitrary
37 $ ls /config/stp-policy/dummy_stm.my-policy/user
39 $ cat /config/stp-policy/dummy_stm.my-policy/user/masters
41 $ cat /config/stp-policy/dummy_stm.my-policy/user/channels
56 to the policy, they need to do a STP_POLICY_ID_SET ioctl on this file
[all …]
/linux-4.4.14/Documentation/security/
DSELinux.txt3 latest reference policy release from
6 However, if you want to install a dummy policy for
16 SELinux enabled and a real policy. If
23 Step 4 will create a new dummy policy valid for your
25 It will compile the policy, will set your SELINUXTYPE to
26 dummy in /etc/selinux/config, install the compiled policy
Dapparmor.txt4 a task centered policy, with task "profiles" being created and loaded
27 policy must be loaded into the kernel from user space (see the Documentation
/linux-4.4.14/Documentation/device-mapper/
Dcache-policies.txt8 Mappings are loaded into the policy at construction time.
10 Every bio that is mapped by the target is referred to the policy.
11 The policy can return a simple HIT or MISS or issue a migration.
13 Currently there's no way for the policy to issue background work,
17 Because we map bios, rather than requests it's easy for the policy
19 issues periodic ticks to the policy. It's suggested that the policy
31 This policy has been deprecated in favor of the smq policy (see below).
33 The multiqueue policy has three sets of 16 queues: one set for entries
39 on hit count on entry. The policy aims to take different cache miss
67 Internally the mq policy determines a promotion threshold. If the hit
[all …]
Dcache.txt20 policy module. Several of these have been written as we experiment,
34 (depending on policy).
50 which are dirty, and extra hints for use by the policy object.
99 A simple cleaner policy is provided, which will clean (write back) all
138 Per-block policy hints
142 the policy how big this chunk is, but it should be kept small. Like the
146 For instance, the 'mq' policy, which is currently the default policy,
179 <policy> <#policy args> [policy args]*
189 policy : the replacement policy to use
190 #policy args : an even number of arguments corresponding to
[all …]
/linux-4.4.14/drivers/net/wireless/cw1200/
Dtxrx.c50 static void tx_policy_dump(struct tx_policy *policy) in tx_policy_dump() argument
53 policy->raw[0] & 0x0F, policy->raw[0] >> 4, in tx_policy_dump()
54 policy->raw[1] & 0x0F, policy->raw[1] >> 4, in tx_policy_dump()
55 policy->raw[2] & 0x0F, policy->raw[2] >> 4, in tx_policy_dump()
56 policy->raw[3] & 0x0F, policy->raw[3] >> 4, in tx_policy_dump()
57 policy->raw[4] & 0x0F, policy->raw[4] >> 4, in tx_policy_dump()
58 policy->raw[5] & 0x0F, policy->raw[5] >> 4, in tx_policy_dump()
59 policy->raw[6] & 0x0F, policy->raw[6] >> 4, in tx_policy_dump()
60 policy->raw[7] & 0x0F, policy->raw[7] >> 4, in tx_policy_dump()
61 policy->raw[8] & 0x0F, policy->raw[8] >> 4, in tx_policy_dump()
[all …]
Dtxrx.h36 struct tx_policy policy; member
/linux-4.4.14/security/selinux/
DKconfig8 You will also need a policy configuration and a labeled filesystem.
46 allows SELinux to be disabled at runtime prior to the policy load.
66 permissive mode (if permitted by the policy) via /selinux/enforce.
93 via /selinux/checkreqprot if authorized by policy.
98 bool "NSA SELinux maximum supported policy format version"
102 This option enables the maximum policy format version supported
104 to userspace via /selinux/policyvers and used at policy load time.
106 does not correctly handle kernels that support newer policy versions.
116 int "NSA SELinux maximum supported policy format version value"
121 This option sets the value for the maximum policy format version
[all …]
/linux-4.4.14/drivers/acpi/
Dprocessor_thermal.c76 struct cpufreq_policy policy; in cpu_has_cpufreq() local
77 if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) in cpu_has_cpufreq()
85 struct cpufreq_policy *policy = data; in acpi_thermal_cpufreq_notifier() local
92 policy->cpuinfo.max_freq * in acpi_thermal_cpufreq_notifier()
93 (100 - reduction_pctg(policy->cpu) * 20) in acpi_thermal_cpufreq_notifier()
96 cpufreq_verify_within_limits(policy, 0, max_freq); in acpi_thermal_cpufreq_notifier()
/linux-4.4.14/block/
Dblk-flush.c100 unsigned int policy = 0; in blk_flush_policy() local
103 policy |= REQ_FSEQ_DATA; in blk_flush_policy()
107 policy |= REQ_FSEQ_PREFLUSH; in blk_flush_policy()
109 policy |= REQ_FSEQ_POSTFLUSH; in blk_flush_policy()
111 return policy; in blk_flush_policy()
388 unsigned int policy = blk_flush_policy(fflags, rq); in blk_insert_flush() local
405 if (!policy) { in blk_insert_flush()
420 if ((policy & REQ_FSEQ_DATA) && in blk_insert_flush()
421 !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { in blk_insert_flush()
441 blk_flush_complete_seq(rq, fq, REQ_FSEQ_ACTIONS & ~policy, 0); in blk_insert_flush()
[all …]
/linux-4.4.14/mm/
Dmempolicy.c256 struct mempolicy *policy; in mpol_new() local
285 policy = kmem_cache_alloc(policy_cache, GFP_KERNEL); in mpol_new()
286 if (!policy) in mpol_new()
288 atomic_set(&policy->refcnt, 1); in mpol_new()
289 policy->mode = mode; in mpol_new()
290 policy->flags = flags; in mpol_new()
292 return policy; in mpol_new()
830 static long do_get_mempolicy(int *policy, nodemask_t *nmask, in do_get_mempolicy() argument
845 *policy = 0; /* just so it's initialized */ in do_get_mempolicy()
879 *policy = err; in do_get_mempolicy()
[all …]
/linux-4.4.14/net/xfrm/
Dxfrm_policy.c284 struct xfrm_policy *policy; in xfrm_policy_alloc() local
286 policy = kzalloc(sizeof(struct xfrm_policy), gfp); in xfrm_policy_alloc()
288 if (policy) { in xfrm_policy_alloc()
289 write_pnet(&policy->xp_net, net); in xfrm_policy_alloc()
290 INIT_LIST_HEAD(&policy->walk.all); in xfrm_policy_alloc()
291 INIT_HLIST_NODE(&policy->bydst); in xfrm_policy_alloc()
292 INIT_HLIST_NODE(&policy->byidx); in xfrm_policy_alloc()
293 rwlock_init(&policy->lock); in xfrm_policy_alloc()
294 atomic_set(&policy->refcnt, 1); in xfrm_policy_alloc()
295 skb_queue_head_init(&policy->polq.hold_queue); in xfrm_policy_alloc()
[all …]
DKconfig24 bool "Transformation sub policy support"
27 Support sub policy for developers. By using sub policy with main
/linux-4.4.14/drivers/clk/bcm/
Dclk-kona-setup.c28 struct ccu_policy *ccu_policy = &ccu->policy; in ccu_data_offsets_valid()
80 struct bcm_clk_policy *policy; in peri_clk_data_offsets_valid() local
98 policy = &peri->policy; in peri_clk_data_offsets_valid()
99 if (policy_exists(policy)) { in peri_clk_data_offsets_valid()
100 if (policy->offset > limit) { in peri_clk_data_offsets_valid()
102 __func__, name, policy->offset, limit); in peri_clk_data_offsets_valid()
239 static bool policy_valid(struct bcm_clk_policy *policy, const char *clock_name) in policy_valid() argument
241 if (!bit_posn_valid(policy->bit, "policy", clock_name)) in policy_valid()
403 struct bcm_clk_policy *policy; in peri_clk_data_valid() local
425 policy = &peri->policy; in peri_clk_data_valid()
[all …]
Dclk-iproc-armpll.c77 unsigned int policy, fid, active_fid; in __get_fid() local
81 policy = val & IPROC_CLK_ARM_DIV_ARM_PLL_SELECT_MASK; in __get_fid()
83 policy = 0; in __get_fid()
86 BUG_ON(policy > IPROC_CLK_MAX_FREQ_POLICY); in __get_fid()
89 fid = (val >> (IPROC_CLK_POLICY_FREQ_POLICY_FREQ_SHIFT * policy)) & in __get_fid()
Dclk-bcm21664.c52 .policy = {
135 .policy = {
238 .policy = {
Dclk-kona.h52 #define policy_exists(policy) ((policy)->offset != 0) argument
391 struct bcm_clk_policy policy; member
482 struct ccu_policy policy; member
Dclk-kona.c215 struct bcm_policy_ctl *control = &ccu->policy.control; in __ccu_policy_engine_start()
269 struct bcm_lvm_en *enable = &ccu->policy.enable; in __ccu_policy_engine_stop()
309 static bool policy_init(struct ccu_data *ccu, struct bcm_clk_policy *policy) in policy_init() argument
316 if (!policy_exists(policy)) in policy_init()
333 offset = policy->offset; in policy_init()
334 mask = (u32)1 << policy->bit; in policy_init()
1202 if (!policy_init(ccu, &peri->policy)) { in __peri_clk_init()
/linux-4.4.14/Documentation/networking/
Dipsec.txt6 policy check on receiver.
16 IPComp header is added to the datagram. This policy ensures saving
30 packet len), the packet is dropped when checking the policy as this packet
36 One workaround is try to set "level use" for each policy if user observed
38 will skip policy checking on receiver side.
Ddccp.txt50 DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes
51 a policy ID as argument and can only be set before the connection (i.e. changes
53 defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special,
64 the interpretation of this parameter depends on the current dequeuing policy
65 (see above): the "simple" policy will enforce a fixed queue size by returning
66 EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the
Dpolicy-routing.txt57 Kernel routing policy rules
137 happily in MAIN+DEFAULT. All policy routes can be set
144 using all the policy list. This is not very convenient and
Dtproxy.txt6 You will need policy routing too, so be sure to enable that as well.
14 value using policy routing to have those packets delivered locally:
/linux-4.4.14/lib/
Dnlattr.c31 const struct nla_policy *policy) in validate_nla() argument
39 pt = &policy[type]; in validate_nla()
123 const struct nla_policy *policy) in nla_validate() argument
129 err = validate_nla(nla, maxtype, policy); in nla_validate()
183 int len, const struct nla_policy *policy) in nla_parse() argument
194 if (policy) { in nla_parse()
195 err = validate_nla(nla, maxtype, policy); in nla_parse()
/linux-4.4.14/drivers/staging/lustre/lustre/mdc/
Dmdc_locks.c156 ldlm_policy_data_t *policy, ldlm_mode_t mode, in mdc_lock_match() argument
164 policy->l_inodebits.bits &= exp_connect_ibits(exp); in mdc_lock_match()
166 &res_id, type, policy, mode, lockh, 0); in mdc_lock_match()
172 ldlm_policy_data_t *policy, in mdc_cancel_unused() argument
183 policy, mode, flags, opaque); in mdc_cancel_unused()
760 ldlm_policy_data_t const *policy = &lookup_policy; in mdc_enqueue() local
778 policy = &update_policy; in mdc_enqueue()
780 policy = &layout_policy; in mdc_enqueue()
782 policy = &getxattr_policy; in mdc_enqueue()
796 policy = lmm; in mdc_enqueue()
[all …]
Dmdc_internal.h137 ldlm_policy_data_t *policy, ldlm_mode_t mode,
149 ldlm_policy_data_t *policy, ldlm_mode_t mode,
/linux-4.4.14/net/bridge/netfilter/
Debtable_nat.c20 .policy = EBT_ACCEPT,
24 .policy = EBT_ACCEPT,
28 .policy = EBT_ACCEPT,
Debtable_filter.c20 .policy = EBT_ACCEPT,
24 .policy = EBT_ACCEPT,
28 .policy = EBT_ACCEPT,
Debtable_broute.c23 .policy = EBT_ACCEPT,
/linux-4.4.14/drivers/staging/lustre/lustre/include/
Dlustre_sec.h140 #define MAKE_FLVR(policy, mech, svc, btype, bsvc) \ argument
141 (((__u32)(policy) << FLVR_POLICY_OFFSET) | \
908 int sptlrpc_register_policy(struct ptlrpc_sec_policy *policy);
909 int sptlrpc_unregister_policy(struct ptlrpc_sec_policy *policy);
918 struct ptlrpc_sec_policy *sptlrpc_policy_get(struct ptlrpc_sec_policy *policy) in sptlrpc_policy_get() argument
920 __module_get(policy->sp_owner); in sptlrpc_policy_get()
921 return policy; in sptlrpc_policy_get()
925 void sptlrpc_policy_put(struct ptlrpc_sec_policy *policy) in sptlrpc_policy_put() argument
927 module_put(policy->sp_owner); in sptlrpc_policy_put()
Dlustre_net.h567 int (*op_policy_init) (struct ptlrpc_nrs_policy *policy);
573 void (*op_policy_fini) (struct ptlrpc_nrs_policy *policy);
582 int (*op_policy_start) (struct ptlrpc_nrs_policy *policy);
591 void (*op_policy_stop) (struct ptlrpc_nrs_policy *policy);
607 int (*op_policy_ctl) (struct ptlrpc_nrs_policy *policy,
645 int (*op_res_get) (struct ptlrpc_nrs_policy *policy,
660 void (*op_res_put) (struct ptlrpc_nrs_policy *policy,
680 (*op_req_get) (struct ptlrpc_nrs_policy *policy, bool peek,
694 int (*op_req_enqueue) (struct ptlrpc_nrs_policy *policy,
704 void (*op_req_dequeue) (struct ptlrpc_nrs_policy *policy,
[all …]
/linux-4.4.14/include/net/
Dnetlink.h237 const struct nla_policy *policy);
239 int len, const struct nla_policy *policy);
370 const struct nla_policy *policy) in nlmsg_parse() argument
376 nlmsg_attrlen(nlh, hdrlen), policy); in nlmsg_parse()
403 const struct nla_policy *policy) in nlmsg_validate() argument
409 nlmsg_attrlen(nlh, hdrlen), maxtype, policy); in nlmsg_validate()
735 const struct nla_policy *policy) in nla_parse_nested() argument
737 return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); in nla_parse_nested()
1228 const struct nla_policy *policy) in nla_validate_nested() argument
1230 return nla_validate(nla_data(start), nla_len(start), maxtype, policy); in nla_validate_nested()
Dgenetlink.h122 const struct nla_policy *policy; member
221 const struct nla_policy *policy) in genlmsg_parse() argument
224 policy); in genlmsg_parse()
/linux-4.4.14/kernel/sched/
Dsched.h87 static inline int idle_policy(int policy) in idle_policy() argument
89 return policy == SCHED_IDLE; in idle_policy()
91 static inline int fair_policy(int policy) in fair_policy() argument
93 return policy == SCHED_NORMAL || policy == SCHED_BATCH; in fair_policy()
96 static inline int rt_policy(int policy) in rt_policy() argument
98 return policy == SCHED_FIFO || policy == SCHED_RR; in rt_policy()
101 static inline int dl_policy(int policy) in dl_policy() argument
103 return policy == SCHED_DEADLINE; in dl_policy()
105 static inline bool valid_policy(int policy) in valid_policy() argument
107 return idle_policy(policy) || fair_policy(policy) || in valid_policy()
[all …]
Dcore.c724 if (current->policy == SCHED_FIFO) in sched_can_stop_tick()
731 if (current->policy == SCHED_RR) { in sched_can_stop_tick()
820 if (idle_policy(p->policy)) { in set_load_weight()
2210 p->policy = SCHED_NORMAL; in sched_fork()
2325 static int dl_overflow(struct task_struct *p, int policy, in dl_overflow() argument
2332 u64 new_bw = dl_policy(policy) ? to_ratio(period, runtime) : 0; in dl_overflow()
2345 if (dl_policy(policy) && !task_has_dl_policy(p) && in dl_overflow()
2349 } else if (dl_policy(policy) && task_has_dl_policy(p) && in dl_overflow()
2354 } else if (!dl_policy(policy) && task_has_dl_policy(p)) { in dl_overflow()
3657 int policy = attr->sched_policy; in __setscheduler_params() local
[all …]
/linux-4.4.14/drivers/staging/lustre/lustre/lmv/
Dlproc_lmv.c100 enum placement_policy policy; in placement_store() local
112 policy = placement_name2policy(dummy, count); in placement_store()
113 if (policy != PLACEMENT_INVAL_POLICY) { in placement_store()
115 lmv->lmv_placement = policy; in placement_store()
/linux-4.4.14/drivers/block/drbd/
Ddrbd_nla.c31 const struct nla_policy *policy) in drbd_nla_parse_nested() argument
37 err = nla_parse_nested(tb, maxtype, nla, policy); in drbd_nla_parse_nested()
Ddrbd_nla.h5 const struct nla_policy *policy);
/linux-4.4.14/Documentation/filesystems/
Dtmpfs.txt81 tmpfs has a mount option to set the NUMA memory allocation policy for
85 mpol=default use the process allocation policy
97 A memory policy with a valid NodeList will be saved, as specified, for
99 system, the mount option memory policy will be applied with a NodeList,
103 policy for the file will revert to "default" policy.
109 memory allocation policy mode flags and their effect on memory policy.
115 allocation policy of MPOL_BIND | MPOL_F_STATIC_NODES.
/linux-4.4.14/net/ieee802154/
Dnl802154.c2188 .policy = nl802154_policy,
2197 .policy = nl802154_policy,
2205 .policy = nl802154_policy,
2213 .policy = nl802154_policy,
2221 .policy = nl802154_policy,
2229 .policy = nl802154_policy,
2237 .policy = nl802154_policy,
2245 .policy = nl802154_policy,
2253 .policy = nl802154_policy,
2261 .policy = nl802154_policy,
[all …]
Dieee802154.h23 .policy = ieee802154_policy, \
32 .policy = ieee802154_policy, \
/linux-4.4.14/net/netlabel/
Dnetlabel_mgmt.c707 .policy = netlbl_mgmt_genl_policy,
714 .policy = netlbl_mgmt_genl_policy,
721 .policy = netlbl_mgmt_genl_policy,
728 .policy = netlbl_mgmt_genl_policy,
735 .policy = netlbl_mgmt_genl_policy,
742 .policy = netlbl_mgmt_genl_policy,
749 .policy = netlbl_mgmt_genl_policy,
756 .policy = netlbl_mgmt_genl_policy,
Dnetlabel_unlabeled.c1326 .policy = netlbl_unlabel_genl_policy,
1333 .policy = netlbl_unlabel_genl_policy,
1340 .policy = netlbl_unlabel_genl_policy,
1347 .policy = netlbl_unlabel_genl_policy,
1354 .policy = netlbl_unlabel_genl_policy,
1361 .policy = netlbl_unlabel_genl_policy,
1368 .policy = netlbl_unlabel_genl_policy,
1375 .policy = netlbl_unlabel_genl_policy,
Dnetlabel_cipso_v4.c743 .policy = netlbl_cipsov4_genl_policy,
750 .policy = netlbl_cipsov4_genl_policy,
757 .policy = netlbl_cipsov4_genl_policy,
764 .policy = netlbl_cipsov4_genl_policy,
/linux-4.4.14/net/nfc/
Dnetlink.c1629 .policy = nfc_genl_policy,
1634 .policy = nfc_genl_policy,
1639 .policy = nfc_genl_policy,
1644 .policy = nfc_genl_policy,
1649 .policy = nfc_genl_policy,
1654 .policy = nfc_genl_policy,
1659 .policy = nfc_genl_policy,
1665 .policy = nfc_genl_policy,
1670 .policy = nfc_genl_policy,
1675 .policy = nfc_genl_policy,
[all …]
/linux-4.4.14/drivers/net/fddi/skfp/
Dpcmplc.c1436 int policy ; in pc_tcode_actions() local
1440 policy = smc->mib.fddiSMTConnectionPolicy ; in pc_tcode_actions()
1446 ((policy & POLICY_AA) && ne == TA) || in pc_tcode_actions()
1447 ((policy & POLICY_AB) && ne == TB) || in pc_tcode_actions()
1448 ((policy & POLICY_AS) && ne == TS) || in pc_tcode_actions()
1449 ((policy & POLICY_AM) && ne == TM) ) in pc_tcode_actions()
1454 ((policy & POLICY_BA) && ne == TA) || in pc_tcode_actions()
1455 ((policy & POLICY_BB) && ne == TB) || in pc_tcode_actions()
1456 ((policy & POLICY_BS) && ne == TS) || in pc_tcode_actions()
1457 ((policy & POLICY_BM) && ne == TM) ) in pc_tcode_actions()
[all …]
/linux-4.4.14/arch/arm/mm/
Dmmu.c77 const char policy[16]; member
85 #define s2_policy(policy) policy argument
87 #define s2_policy(policy) 0 argument
92 .policy = "uncached",
98 .policy = "buffered",
104 .policy = "writethrough",
110 .policy = "writeback",
116 .policy = "writealloc",
162 int len = strlen(cache_policies[i].policy); in early_cachepolicy()
164 if (memcmp(p, cache_policies[i].policy, len) == 0) { in early_cachepolicy()
[all …]
/linux-4.4.14/drivers/staging/lustre/lustre/osc/
Dosc_page.c71 ldlm_policy_data_t *policy;
79 policy = &info->oti_policy;
90 osc_index2policy(policy, page->cp_obj, page->cp_index, page->cp_index);
91 return osc_match_base(osc_export(obj), resname, LDLM_EXTENT, policy,
246 void osc_index2policy(ldlm_policy_data_t *policy, const struct cl_object *obj, in osc_index2policy() argument
249 memset(policy, 0, sizeof(*policy)); in osc_index2policy()
250 policy->l_extent.start = cl_offset(obj, start); in osc_index2policy()
251 policy->l_extent.end = cl_offset(obj, end + 1) - 1; in osc_index2policy()
Dosc_internal.h109 __u64 *flags, ldlm_policy_data_t *policy,
118 __u32 type, ldlm_policy_data_t *policy, __u32 mode,
/linux-4.4.14/net/irda/
Dirnetlink.c138 .policy = irda_nl_policy,
144 .policy = irda_nl_policy,
/linux-4.4.14/Documentation/thermal/
Dx86_pkg_temperature_thermal43 policy to "user_space". For example: echo -n "user_space" > policy
/linux-4.4.14/net/wimax/
Dstack.c423 .policy = wimax_gnl_policy,
429 .policy = wimax_gnl_policy,
435 .policy = wimax_gnl_policy,
441 .policy = wimax_gnl_policy,
/linux-4.4.14/scripts/selinux/mdp/
DMakefile5 clean-files := policy.* file_contexts
/linux-4.4.14/drivers/staging/lustre/lustre/ldlm/
Dldlm_lock.c1054 ldlm_policy_data_t *policy, in search_queue() argument
1093 policy->l_extent.start || in search_queue()
1094 lock->l_policy_data.l_extent.end < policy->l_extent.end)) in search_queue()
1099 lock->l_policy_data.l_extent.gid != policy->l_extent.gid) in search_queue()
1106 policy->l_inodebits.bits) != in search_queue()
1107 policy->l_inodebits.bits)) in search_queue()
1197 ldlm_policy_data_t *policy, ldlm_mode_t mode, in ldlm_lock_match() argument
1223 lock = search_queue(&res->lr_granted, &mode, policy, old_lock, in ldlm_lock_match()
1233 lock = search_queue(&res->lr_waiting, &mode, policy, old_lock, in ldlm_lock_match()
1288 res_id->name[2] : policy->l_extent.start, in ldlm_lock_match()
[all …]
Dldlm_request.c656 ldlm_policy_data_t const *policy, __u64 *flags, in ldlm_cli_enqueue() argument
693 if (policy != NULL) in ldlm_cli_enqueue()
694 lock->l_policy_data = *policy; in ldlm_cli_enqueue()
697 lock->l_req_extent = policy->l_extent; in ldlm_cli_enqueue()
754 policy->l_extent.end == OBD_OBJECT_EOF)); in ldlm_cli_enqueue()
765 err = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, policy ? 1 : 0, in ldlm_cli_enqueue()
1470 ldlm_policy_data_t *policy, in ldlm_cancel_resource_local() argument
1499 if (policy && (lock->l_resource->lr_type == LDLM_IBITS) && in ldlm_cancel_resource_local()
1501 policy->l_inodebits.bits)) in ldlm_cancel_resource_local()
1583 ldlm_policy_data_t *policy, in ldlm_cli_cancel_unused_resource() argument
[all …]
/linux-4.4.14/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi_signal_restart.c53 int policy, int prio) in create_rt_thread() argument
68 ret = pthread_attr_setschedpolicy(&attr, policy); in create_rt_thread()
/linux-4.4.14/drivers/staging/lustre/lustre/llite/
Dllite_mmap.c56 void policy_from_vma(ldlm_policy_data_t *policy, in policy_from_vma() argument
60 policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) + in policy_from_vma()
62 policy->l_extent.end = (policy->l_extent.start + count - 1) | in policy_from_vma()
/linux-4.4.14/net/netfilter/
Dnfnetlink_cttimeout.c548 .policy = cttimeout_nla_policy },
551 .policy = cttimeout_nla_policy },
554 .policy = cttimeout_nla_policy },
557 .policy = cttimeout_nla_policy },
560 .policy = cttimeout_nla_policy },
Dnf_tables_api.c1003 htonl(basechain->policy))) in nf_tables_fill_chain_info()
1236 u8 policy = NF_ACCEPT; in nf_tables_newchain() local
1280 policy = ntohl(nla_get_be32(nla[NFTA_CHAIN_POLICY])); in nf_tables_newchain()
1281 switch (policy) { in nf_tables_newchain()
1326 nft_trans_chain_policy(trans) = policy; in nf_tables_newchain()
1446 basechain->policy = policy; in nf_tables_newchain()
1660 tb[NFTA_EXPR_DATA], type->policy); in nf_tables_expr_parse()
2259 enum nft_set_policies policy) in nft_select_set_ops() argument
2290 switch (policy) { in nft_select_set_ops()
2492 if (set->policy != NFT_SET_POL_PERFORMANCE) { in nf_tables_fill_set()
[all …]
Dnfnetlink_acct.c378 .policy = nfnl_acct_policy },
381 .policy = nfnl_acct_policy },
384 .policy = nfnl_acct_policy },
387 .policy = nfnl_acct_policy },
/linux-4.4.14/net/l2tp/
Dl2tp_netlink.c908 .policy = l2tp_nl_policy,
914 .policy = l2tp_nl_policy,
920 .policy = l2tp_nl_policy,
926 .policy = l2tp_nl_policy,
933 .policy = l2tp_nl_policy,
939 .policy = l2tp_nl_policy,
945 .policy = l2tp_nl_policy,
951 .policy = l2tp_nl_policy,
958 .policy = l2tp_nl_policy,
/linux-4.4.14/drivers/pci/pcie/
DKconfig44 /sys/module/pcie_aspm/parameters/policy
56 prompt "Default ASPM policy"
/linux-4.4.14/net/wireless/
Dnl80211.c10719 .policy = nl80211_policy,
10727 .policy = nl80211_policy,
10735 .policy = nl80211_policy,
10743 .policy = nl80211_policy,
10751 .policy = nl80211_policy,
10759 .policy = nl80211_policy,
10767 .policy = nl80211_policy,
10775 .policy = nl80211_policy,
10784 .policy = nl80211_policy,
10793 .policy = nl80211_policy,
[all …]
/linux-4.4.14/Documentation/ABI/removed/
Ddevfs6 races, contains a naming policy within the kernel that is
/linux-4.4.14/net/netfilter/ipset/
Dip_set_core.c1810 .policy = ip_set_create_policy,
1815 .policy = ip_set_setname_policy,
1820 .policy = ip_set_setname_policy,
1825 .policy = ip_set_setname2_policy,
1830 .policy = ip_set_setname2_policy,
1835 .policy = ip_set_setname_policy,
1840 .policy = ip_set_setname_policy,
1845 .policy = ip_set_adt_policy,
1850 .policy = ip_set_adt_policy,
1855 .policy = ip_set_adt_policy,
[all …]
/linux-4.4.14/net/ipv4/netfilter/
Dnft_reject_ipv4.c55 .policy = nft_reject_policy,
Dnft_masq_ipv4.c47 .policy = nft_masq_policy,
Dnft_redir_ipv4.c56 .policy = nft_redir_policy,
/linux-4.4.14/include/net/netfilter/
Dnf_tables.h314 u16 policy; member
596 const struct nla_policy *policy; member
814 u8 policy; member
1028 u8 policy; member
1038 (((struct nft_trans_chain *)trans->data)->policy)
/linux-4.4.14/net/ipv6/netfilter/
Dnft_reject_ipv6.c56 .policy = nft_reject_policy,
Dnft_masq_ipv6.c47 .policy = nft_masq_policy,
Dnft_redir_ipv6.c55 .policy = nft_redir_policy,
/linux-4.4.14/Documentation/arm/
Dcluster-pm-race-avoidance.txt110 CPU setup complete policy decision
118 policy decision CPU teardown complete
145 from a policy decision on another CPU;
178 The CPU remains in this state until an explicit policy decision
183 Trigger events: explicit policy decision
293 from a policy decision on another CPU;
335 The cluster will remain in this state until a policy decision is
340 Trigger events: policy decision to power down the cluster
370 resulting from a policy decision on another
/linux-4.4.14/include/linux/mfd/wm8350/
Dsupply.h129 struct wm8350_charger_policy *policy; member
/linux-4.4.14/net/hsr/
Dhsr_netlink.c108 .policy = hsr_policy,
452 .policy = hsr_genl_policy,
459 .policy = hsr_genl_policy,
/linux-4.4.14/net/openvswitch/
Ddatapath.c658 .policy = packet_policy,
1395 .policy = flow_policy,
1400 .policy = flow_policy,
1405 .policy = flow_policy,
1411 .policy = flow_policy,
1781 .policy = datapath_policy,
1786 .policy = datapath_policy,
1791 .policy = datapath_policy,
1797 .policy = datapath_policy,
2162 .policy = vport_policy,
[all …]
/linux-4.4.14/Documentation/
Dintel_txt.txt72 protection, or policy support.
80 shutdown, and there is support for policy-based execution/verification.
115 o Tboot then applies an (optional) user-defined launch policy to
117 - This policy is rooted in TPM NV and is described in the tboot
119 create and provision the policy.
168 Tboot's policy determines what happens if the verification fails.
/linux-4.4.14/drivers/thermal/
Dcpu_cooling.c220 struct cpufreq_policy *policy = data; in cpufreq_thermal_notifier() local
229 if (!cpumask_test_cpu(policy->cpu, &cpufreq_dev->allowed_cpus)) in cpufreq_thermal_notifier()
245 if (policy->max > clipped_freq) in cpufreq_thermal_notifier()
246 cpufreq_verify_within_limits(policy, 0, clipped_freq); in cpufreq_thermal_notifier()
/linux-4.4.14/tools/power/cpupower/po/
Dde.po335 msgid " current policy: frequency should be within "
421 msgid " -p, --policy Gets the currently used cpufreq policy *\n"
422 msgstr " -p, --policy Findet die momentane Taktik heraus *\n"
632 "- Trying to set an invalid policy?\n"
683 " -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n"
690 " -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n"
697 "policy.\n"
738 " -b, --perf-bias Gets CPU's power vs performance policy on some\n"
744 msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n"
745 msgstr " -p, --policy Findet die momentane Taktik heraus *\n"
[all …]
Dit.po334 msgid " current policy: frequency should be within "
417 msgid " -p, --policy Gets the currently used cpufreq policy *\n"
419 " -p, --policy Mostra il gestore cpufreq attualmente in uso *\n"
627 "- Trying to set an invalid policy?\n"
680 " -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n"
687 " -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n"
694 "policy.\n"
735 " -b, --perf-bias Gets CPU's power vs performance policy on some\n"
741 msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n"
743 " -p, --policy Mostra il gestore cpufreq attualmente in uso *\n"
[all …]
Dcs.po339 msgid " current policy: frequency should be within "
421 msgid " -p, --policy Gets the currently used cpufreq policy *\n"
422 msgstr " -p, --policy Zjistí aktuální taktiku cpufreq *\n"
621 "- Trying to set an invalid policy?\n"
672 " -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n"
679 " -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n"
686 "policy.\n"
727 " -b, --perf-bias Gets CPU's power vs performance policy on some\n"
733 msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n"
734 msgstr " -p, --policy Zjistí aktuální taktiku cpufreq *\n"
[all …]
Dfr.po334 msgid " current policy: frequency should be within "
416 msgid " -p, --policy Gets the currently used cpufreq policy *\n"
417 msgstr " -p, --policy Affiche la tactique actuelle de cpufreq *\n"
618 "- Trying to set an invalid policy?\n"
672 " -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n"
679 " -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n"
686 "policy.\n"
727 " -b, --perf-bias Gets CPU's power vs performance policy on some\n"
733 msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n"
734 msgstr " -p, --policy Affiche la tactique actuelle de cpufreq *\n"
[all …]
Dpt.po333 msgid " current policy: frequency should be within "
419 msgid " -p, --policy Gets the currently used cpufreq policy *\n"
421 "--p, --policy Obtem a política do cpufreq em uso no momento *\n"
628 "- Trying to set an invalid policy?\n"
682 " -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n"
689 " -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n"
696 "policy.\n"
737 " -b, --perf-bias Gets CPU's power vs performance policy on some\n"
743 msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n"
745 "--p, --policy Obtem a política do cpufreq em uso no momento *\n"
[all …]
/linux-4.4.14/Documentation/cpuidle/
Dcore.txt11 idle policy (governor) from idle mechanism (driver) and provides a
/linux-4.4.14/kernel/locking/
Dlocktorture.c391 int policy; in torture_rtmutex_boost() local
403 policy = SCHED_FIFO; in torture_rtmutex_boost()
417 policy = SCHED_NORMAL; in torture_rtmutex_boost()
423 sched_setscheduler_nocheck(current, policy, &param); in torture_rtmutex_boost()
/linux-4.4.14/include/linux/netfilter/
Dnfnetlink.h20 const struct nla_policy *policy; /* netlink attribute policy */ member

123