| /linux/fs/crypto/ |
| H A D | policy.c | 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() 136 if (policy->contents_encryption_mode != FSCRYPT_MODE_AES_256_XTS) { in supported_iv_ino_lblk_policy() 174 fscrypt_policy_v2_du_bits(policy, inode)) > 32) { in supported_iv_ino_lblk_policy() 183 static bool fscrypt_supported_v1_policy(const struct fscrypt_policy_v1 *policy, in fscrypt_supported_v1_policy() argument 186 if (!fscrypt_valid_enc_modes_v1(policy->contents_encryption_mode, in fscrypt_supported_v1_policy() [all …]
|
| /linux/include/linux/ |
| H A D | cpufreq.h | 72 unsigned int policy; /* see above */ member 192 struct cpufreq_policy *policy; member 207 void cpufreq_cpu_put(struct cpufreq_policy *policy); 217 static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } in cpufreq_cpu_put() argument 223 static inline bool policy_is_inactive(struct cpufreq_policy *policy) in DEFINE_FREE() 225 return cpumask_empty(policy->cpus); in DEFINE_FREE() 228 static inline bool policy_is_shared(struct cpufreq_policy *policy) in policy_is_shared() argument 230 return cpumask_weight(policy->cpus) > 1; in policy_is_shared() 242 void refresh_frequency_limits(struct cpufreq_policy *policy); 247 struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy); [all …]
|
| /linux/drivers/cpufreq/ |
| H A D | cpufreq_userspace.c | 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() 73 static void cpufreq_userspace_policy_exit(struct cpufreq_policy *policy) in cpufreq_userspace_policy_exit() argument 75 kfree(policy->governor_data); in cpufreq_userspace_policy_exit() [all …]
|
| H A D | amd-pstate.c | 232 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 D | gx-suspmod.c | 250 static void gx_set_cpuspeed(struct cpufreq_policy *policy, unsigned int khz) in gx_set_cpuspeed() argument 264 cpufreq_freq_transition_begin(policy, &freqs); in gx_set_cpuspeed() 313 cpufreq_freq_transition_end(policy, &freqs, 0); in gx_set_cpuspeed() 331 static int cpufreq_gx_verify(struct cpufreq_policy_data *policy) in cpufreq_gx_verify() argument 336 if (!stock_freq || !policy) in cpufreq_gx_verify() 339 policy->cpu = 0; in cpufreq_gx_verify() 340 cpufreq_verify_within_limits(policy, (stock_freq / max_duration), in cpufreq_gx_verify() 349 tmp_freq = gx_validate_speed(policy->min, &tmp1, &tmp2); in cpufreq_gx_verify() 350 if (tmp_freq < policy->min) in cpufreq_gx_verify() 352 policy->min = tmp_freq; in cpufreq_gx_verify() [all …]
|
| H A D | longrun.c | 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() 71 static int longrun_set_policy(struct cpufreq_policy *policy) in longrun_set_policy() argument 76 if (!policy) in longrun_set_policy() 83 pctg_lo = (policy->min - longrun_low_freq) / in longrun_set_policy() [all …]
|
| H A D | mediatek-cpufreq-hw.c | 100 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 …]
|
| H A D | apple-soc-cpufreq.c | 137 struct cpufreq_policy *policy; in apple_soc_cpufreq_get_rate() local 142 policy = cpufreq_cpu_get_raw(cpu); in apple_soc_cpufreq_get_rate() 143 if (unlikely(!policy)) in apple_soc_cpufreq_get_rate() 146 priv = policy->driver_data; in apple_soc_cpufreq_get_rate() 162 cpufreq_for_each_valid_entry(p, policy->freq_table) in apple_soc_cpufreq_get_rate() 171 static int apple_soc_cpufreq_set_target(struct cpufreq_policy *policy, in apple_soc_cpufreq_set_target() argument 174 struct apple_cpu_priv *priv = policy->driver_data; in apple_soc_cpufreq_set_target() 175 unsigned int pstate = policy->freq_table[index].driver_data; in apple_soc_cpufreq_set_target() 201 static unsigned int apple_soc_cpufreq_fast_switch(struct cpufreq_policy *policy, in apple_soc_cpufreq_fast_switch() argument 204 if (apple_soc_cpufreq_set_target(policy, policy->cached_resolved_idx) < 0) in apple_soc_cpufreq_fast_switch() [all …]
|
| H A D | scpi-cpufreq.c | 32 struct cpufreq_policy *policy; in scpi_cpufreq_get_rate() local 36 policy = cpufreq_cpu_get_raw(cpu); in scpi_cpufreq_get_rate() 37 if (unlikely(!policy)) in scpi_cpufreq_get_rate() 40 priv = policy->driver_data; in scpi_cpufreq_get_rate() 47 scpi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scpi_cpufreq_set_target() argument 49 unsigned long freq_khz = policy->freq_table[index].frequency; in scpi_cpufreq_set_target() 50 struct scpi_data *priv = policy->driver_data; in scpi_cpufreq_set_target() 91 static int scpi_cpufreq_init(struct cpufreq_policy *policy) in scpi_cpufreq_init() argument 99 cpu_dev = get_cpu_device(policy->cpu); in scpi_cpufreq_init() 101 pr_err("failed to get cpu%d device\n", policy->cpu); in scpi_cpufreq_init() [all …]
|
| H A D | cpufreq_stats.c | 58 static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) in show_total_trans() argument 60 struct cpufreq_stats *stats = policy->stats; in show_total_trans() 69 static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) in show_time_in_state() argument 71 struct cpufreq_stats *stats = policy->stats; in show_time_in_state() 103 static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, in store_reset() argument 106 struct cpufreq_stats *stats = policy->stats; in store_reset() 124 static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) in show_trans_table() argument 126 struct cpufreq_stats *stats = policy->stats; in show_trans_table() 194 void cpufreq_stats_free_table(struct cpufreq_policy *policy) in cpufreq_stats_free_table() argument 196 struct cpufreq_stats *stats = policy->stats; in cpufreq_stats_free_table() [all …]
|
| H A D | scmi-cpufreq.c | 41 struct cpufreq_policy *policy; in scmi_cpufreq_get_rate() local 46 policy = cpufreq_cpu_get_raw(cpu); in scmi_cpufreq_get_rate() 47 if (unlikely(!policy)) in scmi_cpufreq_get_rate() 50 priv = policy->driver_data; in scmi_cpufreq_get_rate() 64 scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) in scmi_cpufreq_set_target() argument 66 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_set_target() 67 u64 freq = policy->freq_table[index].frequency; in scmi_cpufreq_set_target() 72 static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy, in scmi_cpufreq_fast_switch() argument 75 struct scmi_data *priv = policy->driver_data; in scmi_cpufreq_fast_switch() 197 static int scmi_cpufreq_init(struct cpufreq_policy *policy) in scmi_cpufreq_init() argument [all …]
|
| H A D | amd-pstate-ut.c | 122 struct cpufreq_policy *policy __free(put_cpufreq_policy) = NULL; in amd_pstate_ut_check_perf() 125 policy = cpufreq_cpu_get(cpu); in amd_pstate_ut_check_perf() 126 if (!policy) in amd_pstate_ut_check_perf() 128 cpudata = policy->driver_data; in amd_pstate_ut_check_perf() 194 struct cpufreq_policy *policy __free(put_cpufreq_policy) = NULL; in amd_pstate_ut_check_freq() 197 policy = cpufreq_cpu_get(cpu); in amd_pstate_ut_check_freq() 198 if (!policy) in amd_pstate_ut_check_freq() 200 cpudata = policy->driver_data; in amd_pstate_ut_check_freq() 202 if (!((policy->cpuinfo.max_freq >= cpudata->nominal_freq) && in amd_pstate_ut_check_freq() 204 (cpudata->lowest_nonlinear_freq >= policy->cpuinfo.min_freq) && in amd_pstate_ut_check_freq() [all …]
|
| /linux/Documentation/translations/zh_CN/cpu-freq/ |
| H A D | cpu-drivers.rst | 58 .init - 一个指向per-policy初始化函数的指针。 78 .exit - 一个指向per-policy清理函数的指针,该函数在CPU热插拔过程的CPU_POST_DEAD 81 .suspend - 一个指向per-policy暂停函数的指针,该函数在关中断且在该策略的调节器停止 84 .resume - 一个指向per-policy恢复函数的指针,该函数在关中断且在调节器再一次启动前被 87 .ready - 一个指向per-policy准备函数的指针,该函数在策略完全初始化之后被调用。 94 .set_boost - 一个指向per-policy函数的指针,该函数用来开启/关闭提升(boost)频率功能。 101 略不存在,则会调用per-policy的初始化函数cpufreq_driver.init。请注意,.init()和.exit()例程 103 *policy`` 作为参数。现在该怎么做呢? 110 |policy->cpuinfo.min_freq和 | 该CPU支持的最低和最高频率(kHz) | 111 |policy->cpuinfo.max_freq | | [all …]
|
| /linux/Documentation/translations/zh_TW/cpu-freq/ |
| H A D | cpu-drivers.rst | 58 .init - 一個指向per-policy初始化函數的指針。 78 .exit - 一個指向per-policy清理函數的指針,該函數在CPU熱插拔過程的CPU_POST_DEAD 81 .suspend - 一個指向per-policy暫停函數的指針,該函數在關中斷且在該策略的調節器停止 84 .resume - 一個指向per-policy恢復函數的指針,該函數在關中斷且在調節器再一次啓動前被 87 .ready - 一個指向per-policy準備函數的指針,該函數在策略完全初始化之後被調用。 94 .set_boost - 一個指向per-policy函數的指針,該函數用來開啓/關閉提升(boost)頻率功能。 101 略不存在,則會調用per-policy的初始化函數cpufreq_driver.init。請注意,.init()和.exit()例程 103 *policy`` 作爲參數。現在該怎麼做呢? 110 |policy->cpuinfo.min_freq和 | 該CPU支持的最低和最高頻率(kHz) | 111 |policy->cpuinfo.max_freq | | [all …]
|
| /linux/kernel/sched/ |
| H A D | cpufreq_schedutil.c | 19 struct cpufreq_policy *policy; member 83 if (!cpufreq_this_cpu_can_update(sg_policy->policy)) in sugov_should_update_freq() 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() 168 return policy->cur + (policy->cur >> 2); in get_capacity_ref_freq() 196 struct cpufreq_policy *policy = sg_policy->policy; in get_next_freq() local 199 freq = get_capacity_ref_freq(policy); in get_next_freq() 206 return cpufreq_driver_resolve_freq(policy, freq); in get_next_freq() 451 if (sg_policy->policy->fast_switch_enabled) { in sugov_update_single_freq() [all …]
|
| H A D | syscalls.c | 19 static inline int __normal_prio(int policy, int rt_prio, int nice) in __normal_prio() argument 23 if (dl_policy(policy)) in __normal_prio() 25 else if (rt_policy(policy)) in __normal_prio() 42 return __normal_prio(p->policy, p->rt_priority, PRIO_TO_NICE(p->static_prio)); in normal_prio() 272 int policy = attr->sched_policy; in DEFINE_CLASS() local 274 if (policy == SETPARAM_POLICY) in DEFINE_CLASS() 275 policy = p->policy; in DEFINE_CLASS() 277 p->policy = policy; in DEFINE_CLASS() 279 if (dl_policy(policy)) in DEFINE_CLASS() 281 else if (fair_policy(policy)) in DEFINE_CLASS() [all …]
|
| /linux/drivers/hwtracing/stm/ |
| H A D | policy.c | 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() 241 pdrv = policy->stm->pdrv; in stp_policy_node_make() 251 if (policy->stm->pdrv_node_type) in stp_policy_node_make() 252 type = policy->stm->pdrv_node_type; in stp_policy_node_make() [all …]
|
| /linux/drivers/thermal/ |
| H A D | cpufreq_cooling.c | 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 340 policy = cpufreq_cdev->policy; in em_is_sane() [all …]
|
| /linux/net/netlink/ |
| H A D | policy.c | 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() 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 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/security/selinux/ss/ |
| H A D | services.c | 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() 725 static int security_validtrans_handle_fail(struct selinux_policy *policy, in security_validtrans_handle_fail() argument 731 struct policydb *p = &policy->policydb; in security_validtrans_handle_fail() 732 struct sidtab *sidtab = policy->sidtab; in security_validtrans_handle_fail() 759 struct selinux_policy *policy; in security_compute_validatetrans() local 776 policy = rcu_dereference(selinux_state.policy); in security_compute_validatetrans() 777 policydb = &policy->policydb; in security_compute_validatetrans() 778 sidtab = policy->sidtab; in security_compute_validatetrans() [all …]
|
| /linux/Documentation/admin-guide/mm/ |
| H A D | numa_memory_policy.rst | 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 30 The Linux kernel supports _scopes_ of memory policy, described here from 34 this policy is "hard coded" into the kernel. It is the policy 36 one of the more specific policy scopes discussed below. When 37 the system is "up and running", the system default policy will 39 up, the system default policy will be set to interleave 45 this is an optional, per-task policy. When defined for a 46 specific task, this policy controls all page allocations made [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A 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> 34 What: /config/stp-policy/<device>.<policy>/<node>/masters 41 What: /config/stp-policy/<device>.<policy>/<node>/channels
|
| /linux/Documentation/cpu-freq/ |
| H A 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/Documentation/security/ |
| H A D | ipe.rst | 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. 82 4. The policy must be able to be updated, in its entirety, without [all …]
|