/Linux-v6.6/drivers/cpufreq/ |
D | cpufreq.c | 82 static unsigned int __cpufreq_get(struct cpufreq_policy *policy); 83 static int cpufreq_init_governor(struct cpufreq_policy *policy); 84 static void cpufreq_exit_governor(struct cpufreq_policy *policy); 85 static void cpufreq_governor_limits(struct cpufreq_policy *policy); 86 static int cpufreq_set_policy(struct cpufreq_policy *policy, 92 * Two notifier lists: the "policy" list is involved in the 93 * validation process for a new CPU frequency policy; the 120 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy) in get_governor_parent_kobj() argument 123 return &policy->kobj; in get_governor_parent_kobj() 172 * - policy->cpus with all possible CPUs [all …]
|
D | cpufreq_userspace.c | 23 * @policy: pointer to policy struct where freq is being set 28 static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) in cpufreq_set() argument 31 unsigned int *setspeed = policy->governor_data; in cpufreq_set() 33 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set() 36 if (!per_cpu(cpu_is_managed, policy->cpu)) in cpufreq_set() 41 ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L); in cpufreq_set() 47 static ssize_t show_speed(struct cpufreq_policy *policy, char *buf) in show_speed() argument 49 return sprintf(buf, "%u\n", policy->cur); in show_speed() 52 static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy) in cpufreq_userspace_policy_init() argument 60 policy->governor_data = setspeed; in cpufreq_userspace_policy_init() [all …]
|
D | freq_table.c | 17 bool policy_has_boost_freq(struct cpufreq_policy *policy) in policy_has_boost_freq() argument 19 struct cpufreq_frequency_table *pos, *table = policy->freq_table; in policy_has_boost_freq() 32 int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, in cpufreq_frequency_table_cpuinfo() argument 54 policy->min = policy->cpuinfo.min_freq = min_freq; in cpufreq_frequency_table_cpuinfo() 55 policy->max = 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 76 pr_debug("request for verification of policy (%u - %u kHz) for cpu %u\n", in cpufreq_frequency_table_verify() [all …]
|
D | sh-cpufreq.c | 33 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 …]
|
D | longrun.c | 29 * 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 …]
|
D | cppc_cpufreq.c | 164 static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument 172 for_each_cpu(cpu, policy->cpus) { in cppc_cpufreq_cpu_fie_init() 175 cppc_fi->cpu_data = policy->driver_data; in cppc_cpufreq_cpu_fie_init() 194 topology_set_scale_freq_source(&cppc_sftd, policy->cpus); in cppc_cpufreq_cpu_fie_init() 198 * We free all the resources on policy's removal and not on CPU removal as the 203 * We just need to make sure to remove them all on policy->exit(). 205 static void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument 213 /* policy->cpus will be empty here, use related_cpus instead */ in cppc_cpufreq_cpu_fie_exit() 214 topology_clear_scale_freq_source(SCALE_FREQ_SOURCE_CPPC, policy->related_cpus); in cppc_cpufreq_cpu_fie_exit() 216 for_each_cpu(cpu, policy->related_cpus) { in cppc_cpufreq_cpu_fie_exit() [all …]
|
D | amd-pstate.c | 220 if (epp > 0 && cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) { in amd_pstate_set_energy_pref_index() 221 pr_debug("EPP cannot be set under performance policy\n"); in amd_pstate_set_energy_pref_index() 466 static int amd_pstate_verify(struct cpufreq_policy_data *policy) in amd_pstate_verify() argument 468 cpufreq_verify_within_cpu_limits(policy); in amd_pstate_verify() 473 static int amd_pstate_update_freq(struct cpufreq_policy *policy, in amd_pstate_update_freq() argument 477 struct amd_cpudata *cpudata = policy->driver_data; in amd_pstate_update_freq() 487 freqs.old = policy->cur; in amd_pstate_update_freq() 493 WARN_ON(fast_switch && !policy->fast_switch_enabled); in amd_pstate_update_freq() 500 cpufreq_freq_transition_begin(policy, &freqs); in amd_pstate_update_freq() 503 max_perf, fast_switch, policy->governor->flags); in amd_pstate_update_freq() [all …]
|
D | acpi-cpufreq.c | 136 static int set_boost(struct cpufreq_policy *policy, int val) in set_boost() argument 138 on_each_cpu_mask(policy->cpus, boost_set_msr_each, in set_boost() 141 cpumask_pr_args(policy->cpus), str_enabled_disabled(val)); in set_boost() 146 static ssize_t show_freqdomain_cpus(struct cpufreq_policy *policy, char *buf) in show_freqdomain_cpus() argument 148 struct acpi_cpufreq_data *data = policy->driver_data; in show_freqdomain_cpus() 159 static ssize_t store_cpb(struct cpufreq_policy *policy, const char *buf, in store_cpb() argument 173 set_boost(policy, val); in store_cpb() 179 static ssize_t show_cpb(struct cpufreq_policy *policy, char *buf) in show_cpb() argument 201 static unsigned extract_io(struct cpufreq_policy *policy, u32 value) in extract_io() argument 203 struct acpi_cpufreq_data *data = policy->driver_data; in extract_io() [all …]
|
D | qcom-cpufreq-hw.c | 57 struct cpufreq_policy *policy; member 71 static int qcom_cpufreq_set_bw(struct cpufreq_policy *policy, in qcom_cpufreq_set_bw() argument 79 dev = get_cpu_device(policy->cpu); in qcom_cpufreq_set_bw() 112 static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy, in qcom_cpufreq_hw_target_index() argument 115 struct qcom_cpufreq_data *data = policy->driver_data; in qcom_cpufreq_hw_target_index() 117 unsigned long freq = policy->freq_table[index].frequency; in qcom_cpufreq_hw_target_index() 123 for (i = 1; i < cpumask_weight(policy->related_cpus); i++) in qcom_cpufreq_hw_target_index() 127 qcom_cpufreq_set_bw(policy, freq); in qcom_cpufreq_hw_target_index() 149 struct cpufreq_policy *policy; in qcom_cpufreq_get_freq() local 152 policy = cpufreq_cpu_get_raw(cpu); in qcom_cpufreq_get_freq() [all …]
|
D | cpufreq_governor.c | 90 * (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 …]
|
D | mediatek-cpufreq-hw.c | 59 struct cpufreq_policy *policy; in mtk_cpufreq_get_cpu_power() local 62 policy = cpufreq_cpu_get_raw(cpu_dev->id); in mtk_cpufreq_get_cpu_power() 63 if (!policy) in mtk_cpufreq_get_cpu_power() 66 data = policy->driver_data; in mtk_cpufreq_get_cpu_power() 82 static int mtk_cpufreq_hw_target_index(struct cpufreq_policy *policy, in mtk_cpufreq_hw_target_index() argument 85 struct mtk_cpufreq_data *data = policy->driver_data; in mtk_cpufreq_hw_target_index() 95 struct cpufreq_policy *policy; in mtk_cpufreq_hw_get() local 98 policy = cpufreq_cpu_get_raw(cpu); in mtk_cpufreq_hw_get() 99 if (!policy) in mtk_cpufreq_hw_get() 102 data = policy->driver_data; in mtk_cpufreq_hw_get() [all …]
|
D | cpufreq_ondemand.c | 61 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy, in generic_powersave_bias_target() argument 68 struct policy_dbs_info *policy_dbs = policy->governor_data; in generic_powersave_bias_target() 72 struct cpufreq_frequency_table *freq_table = policy->freq_table; in generic_powersave_bias_target() 80 index = cpufreq_frequency_table_target(policy, freq_next, relation); in generic_powersave_bias_target() 86 index = cpufreq_table_find_index_h(policy, freq_avg, in generic_powersave_bias_target() 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 117 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_freq_increase() [all …]
|
/Linux-v6.6/Documentation/admin-guide/mm/ |
D | numa_memory_policy.rst | 2 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-v6.6/fs/crypto/ |
D | policy.c | 3 * 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 135 if (policy->contents_encryption_mode != FSCRYPT_MODE_AES_256_XTS) { in supported_iv_ino_lblk_policy() [all …]
|
/Linux-v6.6/include/linux/ |
D | cpufreq.h | 63 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-v6.6/net/netlink/ |
D | policy.c | 3 * 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() 58 state->policies[state->n_alloc].policy = policy; in add_policy() 67 * netlink_policy_dump_get_policy_idx - retrieve policy index 68 * @state: the policy dump state [all …]
|
/Linux-v6.6/tools/perf/Documentation/ |
D | security.txt | 13 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-v6.6/drivers/hwtracing/stm/ |
D | policy.c | 3 * 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-v6.6/Documentation/cpu-freq/ |
D | cpu-drivers.rst | 48 .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-v6.6/security/apparmor/ |
D | Kconfig | 48 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 sha1 hashing of loaded policy 79 loaded policy provide system administrators a quick way 80 to verify that policy in the kernel matches what is expected, 81 however it can slow down policy load on some devices. In [all …]
|
/Linux-v6.6/Documentation/ABI/testing/ |
D | configfs-stp-policy | 1 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-v6.6/Documentation/admin-guide/pm/ |
D | cpufreq.rst | 85 ``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-v6.6/tools/testing/selftests/net/ |
D | xfrm_policy.sh | 4 # 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) 39 …ip -net $ns xfrm policy add src $lnet dst $rnet dir out tmpl src $me dst $remote proto esp mode tu… 41 …ip -net $ns xfrm policy add src $rnet dst $lnet dir fwd tmpl src $remote dst $me proto esp mode tu… 65 # Adding a policy for '10.0.1.0/23' will make it necessary to 75 # adds new nodes to tree (neither network exists yet in policy database). 76 ip -net $ns xfrm policy add src 10.1.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block 79 ip -net $ns xfrm policy add src 10.2.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block 82 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-v6.6/arch/powerpc/platforms/cell/ |
D | cpufreq_spudemand.c | 25 struct cpufreq_policy *policy; member 36 cpu = info->policy->cpu; in calc_freq() 43 return info->policy->max * info->busy_spus / FIXED_1; in calc_freq() 54 /* after cancel_delayed_work_sync we unset info->policy */ in spu_gov_work() 55 BUG_ON(info->policy == NULL); in spu_gov_work() 58 __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); in spu_gov_work() 61 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_work() 68 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_init_work() 76 static int spu_gov_start(struct cpufreq_policy *policy) in spu_gov_start() argument 78 unsigned int cpu = policy->cpu; in spu_gov_start() [all …]
|
/Linux-v6.6/drivers/thermal/ |
D | cpufreq_cooling.c | 62 * @policy: cpufreq policy. 75 struct cpufreq_policy *policy; member 225 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_get_requested_power() local 227 freq = cpufreq_quick_get(policy->cpu); in cpufreq_get_requested_power() 229 for_each_cpu(cpu, policy->related_cpus) { in cpufreq_get_requested_power() 244 trace_thermal_power_cpu_get_power_simple(policy->cpu, *power); in cpufreq_get_requested_power() 272 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus); in cpufreq_state2power() 302 struct cpufreq_policy *policy = cpufreq_cdev->policy; in cpufreq_power2state() local 309 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state, in cpufreq_power2state() 316 struct cpufreq_policy *policy; in em_is_sane() local [all …]
|