Home
last modified time | relevance | path

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

12345678910>>...45

/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
122 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) in get_governor_parent_kobj() argument
125 return &policy->kobj; in get_governor_parent_kobj()
174 * - 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 return sprintf(buf, "%u\n", policy->cur); in show_speed()
55 static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy) in cpufreq_userspace_policy_init() argument
65 policy->governor_data = userspace; in cpufreq_userspace_policy_init()
70 * Any routine that writes to the policy struct will hold the "rwsem" of
[all …]
H A Dfreq_table.c17 static bool policy_has_boost_freq(struct cpufreq_policy *policy) in policy_has_boost_freq() argument
19 struct cpufreq_frequency_table *pos, *table = policy->freq_table; in policy_has_boost_freq()
31 int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, in cpufreq_frequency_table_cpuinfo() argument
42 if ((!cpufreq_boost_enabled() || !policy->boost_enabled) in cpufreq_frequency_table_cpuinfo()
53 policy->min = policy->cpuinfo.min_freq = min_freq; in cpufreq_frequency_table_cpuinfo()
54 policy->max = max_freq; in cpufreq_frequency_table_cpuinfo()
59 if (policy->cpuinfo.max_freq < max_freq) in cpufreq_frequency_table_cpuinfo()
60 policy->max = policy->cpuinfo.max_freq = max_freq; in cpufreq_frequency_table_cpuinfo()
62 if (policy->min == ~0) in cpufreq_frequency_table_cpuinfo()
68 int cpufreq_frequency_table_verify(struct cpufreq_policy_data *policy, in cpufreq_frequency_table_verify() argument
[all …]
H A Damd-pstate.c230 static int msr_update_perf(struct cpufreq_policy *policy, u8 min_perf, in msr_update_perf() argument
233 struct amd_cpudata *cpudata = policy->driver_data; in msr_update_perf()
253 policy->boost_enabled, in msr_update_perf()
277 static inline int amd_pstate_update_perf(struct cpufreq_policy *policy, in amd_pstate_update_perf() argument
282 return static_call(amd_pstate_update_perf)(policy, min_perf, des_perf, in amd_pstate_update_perf()
286 static int msr_set_epp(struct cpufreq_policy *policy, u8 epp) in msr_set_epp() argument
288 struct amd_cpudata *cpudata = policy->driver_data; in msr_set_epp()
305 policy->boost_enabled, in msr_set_epp()
326 static inline int amd_pstate_set_epp(struct cpufreq_policy *policy, u8 epp) in amd_pstate_set_epp() argument
328 return static_call(amd_pstate_set_epp)(policy, epp); in amd_pstate_set_epp()
[all …]
H A Dcppc_cpufreq.c139 static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument
147 for_each_cpu(cpu, policy->cpus) { in cppc_cpufreq_cpu_fie_init()
150 cppc_fi->cpu_data = policy->driver_data; in cppc_cpufreq_cpu_fie_init()
169 topology_set_scale_freq_source(&cppc_sftd, policy->cpus); in cppc_cpufreq_cpu_fie_init()
173 * We free all the resources on policy's removal and not on CPU removal as the
178 * We just need to make sure to remove them all on policy->exit().
180 static void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument
188 /* policy->cpus will be empty here, use related_cpus instead */ in cppc_cpufreq_cpu_fie_exit()
189 topology_clear_scale_freq_source(SCALE_FREQ_SOURCE_CPPC, policy->related_cpus); in cppc_cpufreq_cpu_fie_exit()
191 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 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.c60 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, in generic_powersave_bias_target() argument
67 struct policy_dbs_info *policy_dbs = policy->governor_data; in generic_powersave_bias_target()
71 struct cpufreq_frequency_table *freq_table = policy->freq_table; in generic_powersave_bias_target()
79 index = cpufreq_frequency_table_target(policy, freq_next, policy->min, in generic_powersave_bias_target()
80 policy->max, relation); in generic_powersave_bias_target()
86 index = cpufreq_table_find_index_h(policy, freq_avg, in generic_powersave_bias_target()
89 index = cpufreq_table_find_index_l(policy, freq_avg, in generic_powersave_bias_target()
108 static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) in ondemand_powersave_bias_init() argument
110 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in ondemand_powersave_bias_init()
115 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument
[all …]
H A Drcpufreq_dt.rs65 fn init(policy: &mut cpufreq::Policy) -> Result<Self::PData> { in init()
66 let cpu = policy.cpu(); in init()
88 // set sharing CPUs, fallback to all CPUs share the `Policy` in init()
95 // Initialize OPP tables for all policy cpus. in init()
98 // before updating policy cpus. Otherwise, we will end up creating in init()
129 policy in init()
136 unsafe { policy.set_freq_table(&freq_table) }; in init()
139 let clk = unsafe { policy.set_clk(dev, None)? }; in init()
141 mask.copy(policy.cpus()); in init()
155 fn exit(_policy: &mut cpufreq::Policy, _data: Option<Self::PData>) -> Result { in exit() argument
[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.
22 * @policy1: the first policy
23 * @policy2: the second policy
36 int fscrypt_policy_to_key_spec(const union fscrypt_policy *policy, in fscrypt_policy_to_key_spec() argument
39 switch (policy->version) { in fscrypt_policy_to_key_spec()
42 memcpy(key_spec->u.descriptor, policy->v1.master_key_descriptor, in fscrypt_policy_to_key_spec()
47 memcpy(key_spec->u.identifier, policy->v2.master_key_identifier, in fscrypt_policy_to_key_spec()
120 static bool supported_iv_ino_lblk_policy(const struct fscrypt_policy_v2 *policy, in supported_iv_ino_lblk_policy() argument
123 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/include/linux/
H A Dcpufreq.h63 unsigned int cpu; /* cpu managing this policy, must be online */
74 unsigned int policy; /* see above */ member
75 unsigned int last_policy; /* policy before unplug */
96 * - Any routine that wants to read from the policy structure will
98 * - Any routine that will write to the policy structure and/or may take away
99 * the policy altogether (eg. CPU hotplug), will hold this lock in write
108 * policy and that the change will affect all of the policy CPUs then.
130 * the driver to set the frequency for this policy. To be set by the
144 /* Per policy boost enabled flag. */
147 /* Per policy boost supported flag. */
[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 in add_policy()
83 netlink_policy_dump_get_policy_idx(struct netlink_policy_dump_state * state,const struct nla_policy * policy,unsigned int maxtype) netlink_policy_dump_get_policy_idx() argument
128 netlink_policy_dump_add_policy(struct netlink_policy_dump_state ** pstate,const struct nla_policy * policy,unsigned int maxtype) netlink_policy_dump_add_policy() argument
153 const struct nla_policy *policy; netlink_policy_dump_add_policy() local
434 struct nlattr *policy; netlink_policy_dump_write() local
[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.rs55 /// Supports multiple clock domains with per-policy governors in `cpu/cpuN/cpufreq/`.
120 /// Policy data.
210 /// use kernel::cpufreq::{Policy, TableIndex};
212 /// fn show_freq(policy: &Policy) -> Result {
213 /// let table = policy.freq_table()?;
387 /// CPU frequency policy.
393 /// A [`Policy`] instance always corresponds to a valid C `struct cpufreq_policy`.
403 /// use kernel::cpufreq::{ETERNAL_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
66 This option selects whether introspection of loaded policy
69 checking loaded policy. This option adds to policy load
73 bool "Enable policy hash introspection by default"
77 This option selects whether sha256 hashing of loaded policy
79 loaded policy provide system administrators a quick way to
80 verify that policy in the kernel matches what is expected,
81 however it can slow down policy load on some devices. In
[all …]
/linux/Documentation/admin-guide/pm/
H A Dcpufreq.rst85 ``CPUFreq`` Policy Objects
104 of its user space interface is based on the policy concept.
129 Once invoked, the ``CPUFreq`` core checks if the policy pointer is already set
130 for the given CPU and if so, it skips the policy object creation. Otherwise,
131 a new policy object is created and initialized, which involves the creation of
132 a new policy directory in ``sysfs``, and the policy pointer corresponding to
133 the given CPU is set to the new policy object's address in memory.
135 Next, the scaling driver's ``->init()`` callback is invoked with the policy
139 to, represented by its policy object) and, if the policy object it has been
140 called for is new, to set parameters of the policy, like the minimum and maximum
[all …]
/linux/kernel/sched/
H A Dcpufreq_schedutil.c17 struct cpufreq_policy *policy; member
81 if (!cpufreq_this_cpu_can_update(sg_policy->policy)) in sugov_should_update_freq()
90 * of policy limits in cpufreq_driver_resolve_freq() or a policy in sugov_should_update_freq()
115 * The policy limits have changed, but if the return value of in sugov_update_next_freq()
120 * policy limits. in sugov_update_next_freq()
145 * correlate frequency and compute capacity for a given cpufreq policy. We use
147 * @policy: the cpufreq policy of the CPU in question.
152 unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) in get_capacity_ref_freq() argument
154 unsigned int freq = arch_scale_freq_ref(policy->cpu); in get_capacity_ref_freq()
160 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>>...45