| /linux/drivers/cpufreq/ |
| H A D | cpufreq.c | 83 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, 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() 151 void cpufreq_generic_init(struct cpufreq_policy *policy, in cpufreq_generic_init() argument 155 policy->freq_table = table; in cpufreq_generic_init() 156 policy->cpuinfo.transition_latency = transition_latency; in cpufreq_generic_init() [all …]
|
| 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 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() 75 static void cpufreq_userspace_policy_exit(struct cpufreq_policy *policy) in cpufreq_userspace_policy_exit() argument 77 kfree(policy->governor_data); in cpufreq_userspace_policy_exit() [all …]
|
| H A D | amd-pstate.c | 239 static int msr_update_perf(struct cpufreq_policy *policy, u8 min_perf, in msr_update_perf() argument 242 struct amd_cpudata *cpudata = policy->driver_data; in msr_update_perf() 260 policy->boost_enabled, in msr_update_perf() 283 static inline int amd_pstate_update_perf(struct cpufreq_policy *policy, in amd_pstate_update_perf() argument 288 return static_call(amd_pstate_update_perf)(policy, min_perf, des_perf, in amd_pstate_update_perf() 292 static int msr_set_epp(struct cpufreq_policy *policy, u8 epp) in msr_set_epp() argument 294 struct amd_cpudata *cpudata = policy->driver_data; in msr_set_epp() 310 policy->boost_enabled, in msr_set_epp() 331 static inline int amd_pstate_set_epp(struct cpufreq_policy *policy, u8 epp) in amd_pstate_set_epp() argument 333 return static_call(amd_pstate_set_epp)(policy, epp); in amd_pstate_set_epp() [all …]
|
| H A D | cppc_cpufreq.c | 150 static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument 159 for_each_cpu(cpu, policy->cpus) { in cppc_cpufreq_cpu_fie_init() 162 cppc_fi->cpu_data = policy->driver_data; in cppc_cpufreq_cpu_fie_init() 183 topology_set_scale_freq_source(sftd, policy->cpus); in cppc_cpufreq_cpu_fie_init() 194 static void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument 203 topology_clear_scale_freq_source(SCALE_FREQ_SOURCE_CPPC, policy->related_cpus); in cppc_cpufreq_cpu_fie_exit() 205 for_each_cpu(cpu, policy->related_cpus) { in cppc_cpufreq_cpu_fie_exit() 276 static inline void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_init() argument 280 static inline void cppc_cpufreq_cpu_fie_exit(struct cpufreq_policy *policy) in cppc_cpufreq_cpu_fie_exit() argument 294 struct cpufreq_policy *policy, in cppc_cpufreq_get_perf_limits() argument [all …]
|
| H A D | cpufreq_ondemand.c | 37 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 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 | amd_freq_sensitivity.c | 38 static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy, in amd_powersave_bias_target() argument 45 struct cpu_data_t *data = &per_cpu(cpu_data, policy->cpu); in amd_powersave_bias_target() 46 struct policy_dbs_info *policy_dbs = policy->governor_data; in amd_powersave_bias_target() 50 if (!policy->freq_table) in amd_powersave_bias_target() 53 rdmsrq_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, &actual.q); in amd_powersave_bias_target() 54 rdmsrq_on_cpu(policy->cpu, MSR_AMD64_FREQ_SENSITIVITY_REFERENCE, &reference.q); in amd_powersave_bias_target() 60 freq_next = policy->cur; in amd_powersave_bias_target() 69 freq_next = policy->cur; in amd_powersave_bias_target() 80 if (data->freq_prev == policy->cur) in amd_powersave_bias_target() 81 freq_next = policy->cur; in amd_powersave_bias_target() [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() 198 static int scmi_cpufreq_init(struct cpufreq_policy *policy) in scmi_cpufreq_init() argument [all …]
|
| H A D | s3c64xx-cpufreq.c | 53 static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, in s3c64xx_cpufreq_set_target() argument 63 old_freq = clk_get_rate(policy->clk) / 1000; in s3c64xx_cpufreq_set_target() 78 ret = clk_set_rate(policy->clk, new_freq * 1000); in s3c64xx_cpufreq_set_target() 93 if (clk_set_rate(policy->clk, old_freq * 1000) < 0) in s3c64xx_cpufreq_set_target() 102 clk_get_rate(policy->clk) / 1000); in s3c64xx_cpufreq_set_target() 146 static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) in s3c64xx_cpufreq_driver_init() argument 150 if (policy->cpu != 0) in s3c64xx_cpufreq_driver_init() 153 policy->clk = clk_get(NULL, "armclk"); in s3c64xx_cpufreq_driver_init() 154 if (IS_ERR(policy->clk)) { in s3c64xx_cpufreq_driver_init() 156 PTR_ERR(policy->clk)); in s3c64xx_cpufreq_driver_init() [all …]
|
| H A D | cpufreq_governor.h | 80 struct cpufreq_policy *policy; member 136 unsigned int (*gov_dbs_update)(struct cpufreq_policy *policy); 141 void (*start)(struct cpufreq_policy *policy); 142 void (*limits)(struct cpufreq_policy *policy); 145 static inline struct dbs_governor *dbs_governor_of(struct cpufreq_policy *policy) in dbs_governor_of() argument 147 return container_of(policy->governor, struct dbs_governor, gov); in dbs_governor_of() 151 int cpufreq_dbs_governor_init(struct cpufreq_policy *policy); 152 void cpufreq_dbs_governor_exit(struct cpufreq_policy *policy); 153 int cpufreq_dbs_governor_start(struct cpufreq_policy *policy); 154 void cpufreq_dbs_governor_stop(struct cpufreq_policy *policy); [all …]
|
| /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() 189 if ((policy->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32) && in supported_iv_ino_lblk_policy() 200 static bool fscrypt_supported_v1_policy(const struct fscrypt_policy_v1 *policy, in fscrypt_supported_v1_policy() argument [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 95 if (!cpufreq_this_cpu_can_update(sg_policy->policy)) in sugov_should_update_freq() 166 unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) in get_capacity_ref_freq() argument 168 unsigned int freq = arch_scale_freq_ref(policy->cpu); in get_capacity_ref_freq() 174 return policy->cpuinfo.max_freq; in get_capacity_ref_freq() 180 return policy->cur + (policy->cur >> 2); in get_capacity_ref_freq() 208 struct cpufreq_policy *policy = sg_policy->policy; in get_next_freq() local 211 freq = get_capacity_ref_freq(policy); in get_next_freq() 218 return cpufreq_driver_resolve_freq(policy, freq); in get_next_freq() 464 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() 244 int policy = attr->sched_policy; in DEFINE_CLASS() local 246 if (policy == SETPARAM_POLICY) in DEFINE_CLASS() 247 policy = p->policy; in DEFINE_CLASS() 249 p->policy = policy; in DEFINE_CLASS() 251 if (dl_policy(policy)) in DEFINE_CLASS() 253 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/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) 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 127 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 152 const struct nla_policy *policy; netlink_policy_dump_add_policy() local 438 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() 726 static int security_validtrans_handle_fail(struct selinux_policy *policy, in security_validtrans_handle_fail() argument 732 struct policydb *p = &policy->policydb; in security_validtrans_handle_fail() 733 struct sidtab *sidtab = policy->sidtab; in security_validtrans_handle_fail() 760 struct selinux_policy *policy; in security_compute_validatetrans() local 777 policy = rcu_dereference(selinux_state.policy); in security_compute_validatetrans() 778 policydb = &policy->policydb; in security_compute_validatetrans() 779 sidtab = policy->sidtab; in security_compute_validatetrans() [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/security/apparmor/ |
| H A 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 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/tools/testing/selftests/net/ |
| H A D | xfrm_policy.sh | 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… 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 107 ip -net $ns xfrm policy add src 10.1.0.0/24 dst 10.0.0.0/23 dir fwd priority 200 action block 112 …ip -net $ns xfrm policy add src 10.253.1.$((RANDOM%255))/$p dst 10.254.1.$((RANDOM%255))/$p dir fw… 122 ip -net $ns xfrm policy get src $lnet dst $rnet dir out > /dev/null 129 ip -net $ns xfrm policy get src $rnet dst $lnet dir fwd > /dev/null 145 ip -net $ns xfrm policy add dst $plain dir out priority 10 action allow [all …]
|
| /linux/net/devlink/ |
| H A D | netlink_gen.c | 709 .policy = devlink_get_nl_policy, 725 .policy = devlink_port_get_do_nl_policy, 732 .policy = devlink_port_get_dump_nl_policy, 742 .policy = devlink_port_set_nl_policy, 752 .policy = devlink_port_new_nl_policy, 762 .policy = devlink_port_del_nl_policy, 772 .policy = devlink_port_split_nl_policy, 782 .policy = devlink_port_unsplit_nl_policy, 792 .policy = devlink_sb_get_do_nl_policy, 799 .policy = devlink_sb_get_dump_nl_policy, [all …]
|