Home
last modified time | relevance | path

Searched full:policy (Results 1 – 25 of 1188) sorted by relevance

12345678910>>...48

/linux/drivers/cpufreq/
H A Dcpufreq.c83 static unsigned int __cpufreq_get(struct cpufreq_policy *policy);
84 static int cpufreq_init_governor(struct cpufreq_policy *policy);
85 static void cpufreq_exit_governor(struct cpufreq_policy *policy);
86 static void cpufreq_governor_limits(struct cpufreq_policy *policy);
87 static int cpufreq_set_policy(struct cpufreq_policy *policy,
94 * Two notifier lists: the "policy" list is involved in the
95 * validation process for a new CPU frequency policy; the
124 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) in get_governor_parent_kobj() argument
127 return &policy->kobj; in get_governor_parent_kobj()
176 * - policy->cpus with all possible CPUs
[all …]
H A Dcpufreq_userspace.c26 * @policy: pointer to policy struct where freq is being set
31 static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) in cpufreq_set() argument
34 struct userspace_policy *userspace = policy->governor_data; in cpufreq_set()
36 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set()
44 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L); in cpufreq_set()
50 static ssize_t show_speed(struct cpufreq_policy *policy, char *buf) in show_speed() argument
52 struct userspace_policy *userspace = policy->governor_data; in show_speed()
57 static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy) in cpufreq_userspace_policy_init() argument
67 policy->governor_data = userspace; in cpufreq_userspace_policy_init()
72 * Any routine that writes to the policy struct will hold the "rwsem" of
[all …]
H A Damd-pstate.c232 static int msr_update_perf(struct cpufreq_policy *policy, u8 min_perf, in msr_update_perf() argument
235 struct amd_cpudata *cpudata = policy->driver_data; in msr_update_perf()
255 policy->boost_enabled, in msr_update_perf()
279 static inline int amd_pstate_update_perf(struct cpufreq_policy *policy, in amd_pstate_update_perf() argument
284 return static_call(amd_pstate_update_perf)(policy, min_perf, des_perf, in amd_pstate_update_perf()
288 static int msr_set_epp(struct cpufreq_policy *policy, u8 epp) in msr_set_epp() argument
290 struct amd_cpudata *cpudata = policy->driver_data; in msr_set_epp()
307 policy->boost_enabled, in msr_set_epp()
328 static inline int amd_pstate_set_epp(struct cpufreq_policy *policy, u8 epp) in amd_pstate_set_epp() argument
330 return static_call(amd_pstate_set_epp)(policy, epp); in amd_pstate_set_epp()
[all …]
H A Dcppc_cpufreq.c147 static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument
156 for_each_cpu(cpu, policy->cpus) { in cppc_cpufreq_cpu_fie_init()
159 cppc_fi->cpu_data = policy->driver_data; in cppc_cpufreq_cpu_fie_init()
180 topology_set_scale_freq_source(sftd, policy->cpus); in cppc_cpufreq_cpu_fie_init()
184 * We free all the resources on policy's removal and not on CPU removal as the
189 * We just need to make sure to remove them all on policy->exit().
191 static void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument
199 /* policy->cpus will be empty here, use related_cpus instead */ in cppc_cpufreq_cpu_fie_exit()
200 topology_clear_scale_freq_source(SCALE_FREQ_SOURCE_CPPC, policy->related_cpus); in cppc_cpufreq_cpu_fie_exit()
202 for_each_cpu(cpu, policy->related_cpus) { in cppc_cpufreq_cpu_fie_exit()
[all …]
H A Dlongrun.c29 * longrun_get_policy - get the current LongRun policy
30 * @policy: struct cpufreq_policy where current policy is written into
32 * Reads the current LongRun policy by access to MSR_TMTA_LONGRUN_FLAGS
35 static void longrun_get_policy(struct cpufreq_policy *policy) in longrun_get_policy() argument
42 policy->policy = CPUFREQ_POLICY_PERFORMANCE; in longrun_get_policy()
44 policy->policy = CPUFREQ_POLICY_POWERSAVE; in longrun_get_policy()
53 policy->min = policy->max = longrun_high_freq; in longrun_get_policy()
55 policy->min = longrun_low_freq + msr_lo * in longrun_get_policy()
57 policy->max = longrun_low_freq + msr_hi * in longrun_get_policy()
60 policy->cpu = 0; in longrun_get_policy()
[all …]
H A Dvirtual-cpufreq.c92 static unsigned int virt_cpufreq_set_perf(struct cpufreq_policy *policy, in virt_cpufreq_set_perf() argument
96 base + policy->cpu * PER_CPU_OFFSET + REG_SET_PERF_STATE_OFFSET); in virt_cpufreq_set_perf()
100 static unsigned int virt_cpufreq_fast_switch(struct cpufreq_policy *policy, in virt_cpufreq_fast_switch() argument
103 virt_cpufreq_set_perf(policy, target_freq); in virt_cpufreq_fast_switch()
115 static int virt_cpufreq_target(struct cpufreq_policy *policy, in virt_cpufreq_target() argument
122 freqs.old = policy->cur; in virt_cpufreq_target()
125 cpufreq_freq_transition_begin(policy, &freqs); in virt_cpufreq_target()
126 ret = virt_cpufreq_set_perf(policy, target_freq); in virt_cpufreq_target()
127 cpufreq_freq_transition_end(policy, &freqs, ret != 0); in virt_cpufreq_target()
132 static int virt_cpufreq_get_sharing_cpus(struct cpufreq_policy *policy) in virt_cpufreq_get_sharing_cpus() argument
[all …]
H A Dacpi-cpufreq.c131 static int set_boost(struct cpufreq_policy *policy, int val) in set_boost() argument
133 on_each_cpu_mask(policy->cpus, boost_set_msr_each, in set_boost()
136 cpumask_pr_args(policy->cpus), str_enabled_disabled(val)); in set_boost()
141 static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf) in show_freqdomain_cpus() argument
143 struct acpi_cpufreq_data *data = policy->driver_data; in show_freqdomain_cpus()
154 static ssize_t store_cpb(struct cpufreq_policy *policy, const char *buf, in store_cpb() argument
168 set_boost(policy, val); in store_cpb()
174 static ssize_t show_cpb(struct cpufreq_policy *policy, char *buf) in show_cpb() argument
196 static unsigned extract_io(struct cpufreq_policy *policy, u32 value) in extract_io() argument
198 struct acpi_cpufreq_data *data = policy->driver_data; in extract_io()
[all …]
H A Dcpufreq_ondemand.c37 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, in generic_powersave_bias_target() argument
44 struct policy_dbs_info *policy_dbs = policy->governor_data; in generic_powersave_bias_target()
48 struct cpufreq_frequency_table *freq_table = policy->freq_table; in generic_powersave_bias_target()
56 index = cpufreq_frequency_table_target(policy, freq_next, policy->min, in generic_powersave_bias_target()
57 policy->max, relation); in generic_powersave_bias_target()
63 index = cpufreq_table_find_index_h(policy, freq_avg, in generic_powersave_bias_target()
66 index = cpufreq_table_find_index_l(policy, freq_avg, in generic_powersave_bias_target()
85 static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) in ondemand_powersave_bias_init() argument
87 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in ondemand_powersave_bias_init()
92 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument
[all …]
H A Dqcom-cpufreq-hw.c58 struct cpufreq_policy *policy; member
72 static int qcom_cpufreq_set_bw(struct cpufreq_policy *policy, in qcom_cpufreq_set_bw() argument
80 dev = get_cpu_device(policy->cpu); in qcom_cpufreq_set_bw()
113 static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy, in qcom_cpufreq_hw_target_index() argument
116 struct qcom_cpufreq_data *data = policy->driver_data; in qcom_cpufreq_hw_target_index()
118 unsigned long freq = policy->freq_table[index].frequency; in qcom_cpufreq_hw_target_index()
124 for (i = 1; i < cpumask_weight(policy->related_cpus); i++) in qcom_cpufreq_hw_target_index()
128 qcom_cpufreq_set_bw(policy, freq); in qcom_cpufreq_hw_target_index()
146 static unsigned int qcom_cpufreq_get_freq(struct cpufreq_policy *policy) in qcom_cpufreq_get_freq() argument
152 if (!policy) in qcom_cpufreq_get_freq()
[all …]
H A Dcpufreq_governor.c90 * (that may be a single policy or a bunch of them if governor tunables are
102 for_each_cpu(j, policy_dbs->policy->cpus) { in gov_update_cpu_data()
114 unsigned int dbs_update(struct cpufreq_policy *policy) in dbs_update() argument
116 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_update()
137 for_each_cpu(j, policy->cpus) { in dbs_update()
236 struct cpufreq_policy *policy; in dbs_work_handler() local
240 policy = policy_dbs->policy; in dbs_work_handler()
241 gov = dbs_governor_of(policy); in dbs_work_handler()
248 gov_update_sample_delay(policy_dbs, gov->gov_dbs_update(policy)); in dbs_work_handler()
277 if (!cpufreq_this_cpu_can_update(policy_dbs->policy)) in dbs_update_util_handler()
[all …]
H A Dmediatek-cpufreq-hw.c100 struct cpufreq_policy *policy; in mtk_cpufreq_get_cpu_power() local
103 policy = cpufreq_cpu_get_raw(cpu_dev->id); in mtk_cpufreq_get_cpu_power()
104 if (!policy) in mtk_cpufreq_get_cpu_power()
107 data = policy->driver_data; in mtk_cpufreq_get_cpu_power()
124 struct cpufreq_policy *policy) in mtk_cpufreq_hw_fdvfs_switch() argument
126 struct mtk_cpufreq_domain *data = policy->driver_data; in mtk_cpufreq_hw_fdvfs_switch()
131 for_each_cpu(cpu, policy->real_cpus) { in mtk_cpufreq_hw_fdvfs_switch()
136 static int mtk_cpufreq_hw_target_index(struct cpufreq_policy *policy, in mtk_cpufreq_hw_target_index() argument
139 struct mtk_cpufreq_domain *data = policy->driver_data; in mtk_cpufreq_hw_target_index()
143 target_freq = policy->freq_table[index].frequency; in mtk_cpufreq_hw_target_index()
[all …]
/linux/Documentation/admin-guide/mm/
H A Dnuma_memory_policy.rst2 NUMA Memory Policy
5 What is NUMA Memory Policy?
8 In the Linux kernel, "memory policy" determines from which node the kernel will
11 The current memory policy support was added to Linux 2.6 around May 2004. This
12 document attempts to describe the concepts and APIs of the 2.6 memory policy
24 Memory Policy Concepts
30 The Linux kernel supports _scopes_ of memory policy, described here from
33 System Default Policy
34 this policy is "hard coded" into the kernel. It is the policy
36 one of the more specific policy scopes discussed below. When
[all …]
/linux/fs/crypto/
H A Dpolicy.c3 * Encryption policy functions for per-file encryption support.
10 * Modified by Eric Biggers, 2019 for v2 policy support.
24 * @policy1: the first policy
25 * @policy2: the second policy
38 int fscrypt_policy_to_key_spec(const union fscrypt_policy *policy, in fscrypt_policy_to_key_spec() argument
41 switch (policy->version) { in fscrypt_policy_to_key_spec()
44 memcpy(key_spec->u.descriptor, policy->v1.master_key_descriptor, in fscrypt_policy_to_key_spec()
49 memcpy(key_spec->u.identifier, policy->v2.master_key_identifier, in fscrypt_policy_to_key_spec()
122 static bool supported_iv_ino_lblk_policy(const struct fscrypt_policy_v2 *policy, in supported_iv_ino_lblk_policy() argument
125 const char *type = (policy->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64) in supported_iv_ino_lblk_policy()
[all …]
/linux/Documentation/security/
H A Dipe.rst3 Integrity Policy Enforcement (IPE) - Kernel Documentation
20 policy. A mandatory access control system would be present, and
41 enforce the integrity policy, or it should not.
44 policy would indicate what labels required integrity verification, which
48 file should be subject to integrity policy.
75 The next step was to choose a *policy* to enforce the integrity mechanism.
76 The minimum requirements for the policy were:
78 1. The policy itself must be integrity verified (preventing trivial
80 2. The policy itself must be resistant to rollback attacks.
81 3. The policy enforcement must have a permissive-like mode.
[all …]
/linux/net/netlink/
H A Dpolicy.c3 * NETLINK Policy advertisement to userspace
22 const struct nla_policy *policy; member
28 const struct nla_policy *policy, in add_policy() argument
34 if (!policy || !maxtype) in add_policy()
38 if (state->policies[i].policy == policy && in add_policy()
42 if (!state->policies[i].policy) { in add_policy()
43 state->policies[i].policy = policy; in add_policy()
60 state->policies[old_n_alloc].policy = policy; in add_policy()
68 * netlink_policy_dump_get_policy_idx - retrieve policy index
69 * @state: the policy dump state
[all …]
/linux/tools/perf/Documentation/
H A Dsecurity.txt13 Targeted policy with perf_event_open() access control capabilities:
15 1. Download selinux-policy SRPM package (e.g. selinux-policy-3.14.4-48.fc31.src.rpm on FC31)
18 # rpm -Uhv selinux-policy-3.14.4-48.fc31.src.rpm
22 # rpmbuild -bp selinux-policy.spec
24 3. Place patch below at rpmbuild/BUILD/selinux-policy-b86eaaf4dbcf2d51dd4432df7185c0eaf3cbcc02
27 # patch -p1 < selinux-policy-perf-events-perfmon.patch
28 patching file policy/flask/access_vectors
29 patching file policy/flask/security_classes
30 # cat selinux-policy-perf-events-perfmon.patch
31 diff -Nura a/policy/flask/access_vectors b/policy/flask/access_vectors
[all …]
/linux/drivers/hwtracing/stm/
H A Dpolicy.c3 * System Trace Module (STM) master/channel allocation policy management
6 * A master/channel allocation policy allows mapping string identifiers to
21 * STP Master/Channel allocation policy configfs layout.
31 struct stp_policy *policy; member
110 stm = policy_node->policy->stm; in stp_policy_node_masters_store()
157 stm = policy_node->policy->stm; in stp_policy_node_channels_store()
228 struct stp_policy *policy; in stp_policy_node_make() local
231 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make()
235 policy = parent_node->policy; in stp_policy_node_make()
238 if (!policy->stm) in stp_policy_node_make()
[all …]
/linux/Documentation/cpu-freq/
H A Dcpu-drivers.rst48 .init - A pointer to the per-policy initialization function.
68 .exit - A pointer to a per-policy cleanup function called during
71 .suspend - A pointer to a per-policy suspend function which is called
73 policy.
75 .resume - A pointer to a per-policy resume function which is called
78 .ready - A pointer to a per-policy ready function which is called after
79 the policy is fully initialized.
86 .set_boost - A pointer to a per-policy function to enable/disable boost
94 cpufreq driver registers itself, the per-policy initialization function
95 cpufreq_driver.init is called if no cpufreq policy existed for the CPU.
[all …]
/linux/rust/kernel/
H A Dcpufreq.rs54 /// Supports multiple clock domains with per-policy governors in `cpu/cpuN/cpufreq/`.
119 /// Policy data.
209 /// use kernel::cpufreq::{Policy, TableIndex};
211 /// fn show_freq(policy: &Policy) -> Result {
212 /// let table = policy.freq_table()?;
386 /// CPU frequency policy.
392 /// A [`Policy`] instance always corresponds to a valid C `struct cpufreq_policy`.
402 /// use kernel::cpufreq::{DEFAULT_TRANSITION_LATENCY_NS, Policy};
405 /// fn update_policy(policy: &mut Policy) {
406 /// policy
[all …]
/linux/security/apparmor/
H A DKconfig48 bool "Allow loaded policy to be introspected"
52 This option selects whether introspection of loaded policy
55 of loaded policy, and check point and restore support. It
65 This option selects whether introspection of loaded policy
68 checking loaded policy. This option adds to policy load
72 bool "Enable policy hash introspection by default"
76 This option selects whether sha256 hashing of loaded policy
78 loaded policy provide system administrators a quick way to
79 verify that policy in the kernel matches what is expected,
80 however it can slow down policy load on some devices. In
[all …]
/linux/kernel/sched/
H A Dcpufreq_schedutil.c19 struct cpufreq_policy *policy; member
83 if (!cpufreq_this_cpu_can_update(sg_policy->policy)) in sugov_should_update_freq()
92 * of policy limits in cpufreq_driver_resolve_freq() or a policy in sugov_should_update_freq()
117 * The policy limits have changed, but if the return value of in sugov_update_next_freq()
122 * policy limits. in sugov_update_next_freq()
147 * correlate frequency and compute capacity for a given cpufreq policy. We use
149 * @policy: the cpufreq policy of the CPU in question.
154 unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) in get_capacity_ref_freq() argument
156 unsigned int freq = arch_scale_freq_ref(policy->cpu); in get_capacity_ref_freq()
162 return policy->cpuinfo.max_freq; in get_capacity_ref_freq()
[all …]
/linux/Documentation/ABI/testing/
H A 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>
30 Policy node is a string identifier that software clients will
34 What: /config/stp-policy/<device>.<policy>/<node>/masters
[all …]
/linux/tools/testing/selftests/net/
H A Dxfrm_policy.sh4 # Check xfrm policy resolution. Topology:
15 # ns1: ping 10.0.1.253: passes via ipsec tunnel (direct policy)
16 # ns2: ping 10.0.2.253: passes via ipsec tunnel (direct policy)
38 …ip -net $ns xfrm policy add src $lnet dst $rnet dir out tmpl src $me dst $remote proto esp mode tu…
40 …ip -net $ns xfrm policy add src $rnet dst $lnet dir fwd tmpl src $remote dst $me proto esp mode tu…
64 # Adding a policy for '10.0.1.0/23' will make it necessary to
74 # adds new nodes to tree (neither network exists yet in policy database).
75 ip -net $ns xfrm policy add src 10.1.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block
78 ip -net $ns xfrm policy add src 10.2.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block
81 ip -net $ns xfrm policy add src 10.2.0.0/23 dst 10.0.1.0/24 dir fwd priority 200 action block
[all …]
/linux/security/selinux/ss/
H A Dservices.c15 * Added conditional policy language extensions
20 * Added support for the policy capability bitmap
32 * Added support for runtime switching of the policy type
130 pr_info("SELinux: Class %s not defined in policy.\n", in selinux_set_mapping()
149 pr_info("SELinux: Permission %s in class %s not defined in policy.\n", in selinux_set_mapping()
174 * Get real, policy values from mapped values
186 * Get kernel value for class from its policy value
242 struct selinux_policy *policy; in security_mls_enabled() local
248 policy = rcu_dereference(selinux_state.policy); in security_mls_enabled()
249 mls_enabled = policy->policydb.mls_enabled; in security_mls_enabled()
[all …]
/linux/drivers/thermal/
H A Dcpufreq_cooling.c60 * @policy: cpufreq policy.
73 struct cpufreq_policy *policy; member
237 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_get_requested_power() local
239 freq = cpufreq_quick_get(policy->cpu); in cpufreq_get_requested_power()
241 for_each_cpu(cpu, policy->related_cpus) { in cpufreq_get_requested_power()
256 trace_thermal_power_cpu_get_power_simple(policy->cpu, *power); in cpufreq_get_requested_power()
285 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus); in cpufreq_state2power()
320 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_power2state() local
327 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state, in cpufreq_power2state()
334 struct cpufreq_policy *policy; in em_is_sane() local
[all …]

12345678910>>...48