Home
last modified time | relevance | path

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

12345678910>>...47

/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,
93 * Two notifier lists: the "policy" list is involved in the
94 * validation process for a new CPU frequency policy; the
121 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) in get_governor_parent_kobj() argument
124 return &policy->kobj; in get_governor_parent_kobj()
173 * - 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 bool policy_has_boost_freq(struct cpufreq_policy *policy) in policy_has_boost_freq() argument
19 struct cpufreq_frequency_table *pos, *table = policy->freq_table; in policy_has_boost_freq()
32 int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, in cpufreq_frequency_table_cpuinfo() argument
43 if ((!cpufreq_boost_enabled() || !policy->boost_enabled) in cpufreq_frequency_table_cpuinfo()
54 policy->min = policy->cpuinfo.min_freq = min_freq; in cpufreq_frequency_table_cpuinfo()
55 policy->max = max_freq; in cpufreq_frequency_table_cpuinfo()
60 if (policy->cpuinfo.max_freq < max_freq) in cpufreq_frequency_table_cpuinfo()
61 policy->max = policy->cpuinfo.max_freq = max_freq; in cpufreq_frequency_table_cpuinfo()
63 if (policy->min == ~0) in cpufreq_frequency_table_cpuinfo()
69 int cpufreq_frequency_table_verify(struct cpufreq_policy_data *policy, in cpufreq_frequency_table_verify() argument
[all …]
H A Damd-pstate.c319 static int amd_pstate_set_energy_pref_index(struct cpufreq_policy *policy, in amd_pstate_set_energy_pref_index() argument
322 struct amd_cpudata *cpudata = policy->driver_data; in amd_pstate_set_energy_pref_index()
330 if (epp > 0 && cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) { in amd_pstate_set_energy_pref_index()
331 pr_debug("EPP cannot be set under performance policy\n"); in amd_pstate_set_energy_pref_index()
340 policy->boost_enabled); in amd_pstate_set_energy_pref_index()
538 struct cpufreq_policy *policy = cpufreq_cpu_get(cpudata->cpu); in amd_pstate_update() local
544 policy->cur = div_u64(des_perf * max_freq, max_perf); in amd_pstate_update()
563 cpufreq_cpu_put(policy); in amd_pstate_update()
569 * Initialize lower frequency limit (i.e.policy->min) with in amd_pstate_verify()
575 struct cpufreq_policy *policy = cpufreq_cpu_get(policy_data->cpu); in amd_pstate_verify() local
[all …]
H A Dcppc_cpufreq.c141 static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument
149 for_each_cpu(cpu, policy->cpus) { in cppc_cpufreq_cpu_fie_init()
152 cppc_fi->cpu_data = policy->driver_data; in cppc_cpufreq_cpu_fie_init()
171 topology_set_scale_freq_source(&cppc_sftd, policy->cpus); in cppc_cpufreq_cpu_fie_init()
175 * We free all the resources on policy's removal and not on CPU removal as the
180 * We just need to make sure to remove them all on policy->exit().
182 static void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument
190 /* policy->cpus will be empty here, use related_cpus instead */ in cppc_cpufreq_cpu_fie_exit()
191 topology_clear_scale_freq_source(SCALE_FREQ_SOURCE_CPPC, policy->related_cpus); in cppc_cpufreq_cpu_fie_exit()
193 for_each_cpu(cpu, policy->related_cpus) { in cppc_cpufreq_cpu_fie_exit()
[all …]
H A Dsh-cpufreq.c33 struct cpufreq_policy *policy; member
45 struct cpufreq_policy *policy = target->policy; in __sh_cpufreq_target() local
46 int cpu = policy->cpu; in __sh_cpufreq_target()
60 if (freq < (policy->min * 1000) || freq > (policy->max * 1000)) in __sh_cpufreq_target()
69 cpufreq_freq_transition_begin(target->policy, &freqs); in __sh_cpufreq_target()
71 cpufreq_freq_transition_end(target->policy, &freqs, 0); in __sh_cpufreq_target()
80 static int sh_cpufreq_target(struct cpufreq_policy *policy, in sh_cpufreq_target() argument
84 struct cpufreq_target data = { .policy = policy, .freq = target_freq }; in sh_cpufreq_target()
86 return work_on_cpu(policy->cpu, __sh_cpufreq_target, &data); in sh_cpufreq_target()
89 static int sh_cpufreq_verify(struct cpufreq_policy_data *policy) in sh_cpufreq_verify() argument
[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_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()
235 struct cpufreq_policy *policy; in dbs_work_handler() local
239 policy = policy_dbs->policy; in dbs_work_handler()
240 gov = dbs_governor_of(policy); in dbs_work_handler()
247 gov_update_sample_delay(policy_dbs, gov->gov_dbs_update(policy)); in dbs_work_handler()
276 if (!cpufreq_this_cpu_can_update(policy_dbs->policy)) in dbs_update_util_handler()
[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, relation); in generic_powersave_bias_target()
85 index = cpufreq_table_find_index_h(policy, freq_avg, in generic_powersave_bias_target()
88 index = cpufreq_table_find_index_l(policy, freq_avg, in generic_powersave_bias_target()
107 static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) in ondemand_powersave_bias_init() argument
109 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in ondemand_powersave_bias_init()
114 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument
116 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_freq_increase()
[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. */
171 * Used for passing new cpufreq policy data to the cpufreq driver's ->verify()
[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/drivers/gpu/drm/xe/
H A Dxe_gt_sriov_pf_policy.c80 xe_gt_sriov_notice(gt, "Failed to push %u policy KLV%s (%pe)\n", in pf_push_policy_klvs()
99 static int pf_update_policy_bool(struct xe_gt *gt, u16 key, bool *policy, bool value) in pf_update_policy_bool() argument
105 xe_gt_sriov_notice(gt, "Failed to update policy %#x '%s' to '%s' (%pe)\n", in pf_update_policy_bool()
111 xe_gt_sriov_dbg(gt, "policy key %#x '%s' updated to '%s'\n", in pf_update_policy_bool()
115 *policy = value; in pf_update_policy_bool()
119 static int pf_update_policy_u32(struct xe_gt *gt, u16 key, u32 *policy, u32 value) in pf_update_policy_u32() argument
125 xe_gt_sriov_notice(gt, "Failed to update policy %#x '%s' to '%s' (%pe)\n", in pf_update_policy_u32()
131 xe_gt_sriov_dbg(gt, "policy key %#x '%s' updated to %u\n", in pf_update_policy_u32()
134 *policy = value; in pf_update_policy_u32()
158 &gt->sriov.pf.policy.guc.sched_if_idle, in pf_provision_sched_if_idle()
[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/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/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/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()
119 * correlate frequency and compute capacity for a given cpufreq policy. We use
121 * @policy: the cpufreq policy of the CPU in question.
126 unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) in get_capacity_ref_freq() argument
128 unsigned int freq = arch_scale_freq_ref(policy->cpu); in get_capacity_ref_freq()
134 return policy->cpuinfo.max_freq; in get_capacity_ref_freq()
140 return policy->cur + (policy->cur >> 2); in get_capacity_ref_freq()
144 * get_next_freq - Compute a new frequency for a given cpufreq policy.
145 * @sg_policy: schedutil policy object to compute the new frequency for.
[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
129 pr_info("SELinux: Class %s not defined in policy.\n", in selinux_set_mapping()
148 pr_info("SELinux: Permission %s in class %s not defined in policy.\n", in selinux_set_mapping()
173 * Get real, policy values from mapped values
185 * Get kernel value for class from its policy value
241 struct selinux_policy *policy; in security_mls_enabled() local
247 policy = rcu_dereference(selinux_state.policy); in security_mls_enabled()
248 mls_enabled = policy->policydb.mls_enabled; in security_mls_enabled()
[all …]

12345678910>>...47