• Home
  • Raw
  • Download

Lines Matching full:policy

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
115 stm = policy_node->policy->stm; in stp_policy_node_masters_store()
162 stm = policy_node->policy->stm; in stp_policy_node_channels_store()
233 struct stp_policy *policy; in stp_policy_node_make() local
236 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make()
240 policy = parent_node->policy; in stp_policy_node_make()
243 if (!policy->stm) in stp_policy_node_make()
246 pdrv = policy->stm->pdrv; in stp_policy_node_make()
256 if (policy->stm->pdrv_node_type) in stp_policy_node_make()
257 type = policy->stm->pdrv_node_type; in stp_policy_node_make()
261 policy_node->policy = policy; in stp_policy_node_make()
264 policy_node->first_master = policy->stm->data->sw_start; in stp_policy_node_make()
265 policy_node->last_master = policy->stm->data->sw_end; in stp_policy_node_make()
267 policy_node->last_channel = policy->stm->data->sw_nchannels - 1; in stp_policy_node_make()
296 struct stp_policy *policy = to_stp_policy(item); in stp_policy_device_show() local
300 (policy && policy->stm) ? in stp_policy_device_show()
301 policy->stm->data->name : in stp_policy_device_show()
312 struct stp_policy *policy = to_stp_policy(item); in stp_policy_protocol_show() local
316 (policy && policy->stm) ? in stp_policy_protocol_show()
317 policy->stm->pdrv->name : in stp_policy_protocol_show()
331 void stp_policy_unbind(struct stp_policy *policy) in stp_policy_unbind() argument
333 struct stm_device *stm = policy->stm; in stp_policy_unbind()
336 * stp_policy_release() will not call here if the policy is already in stp_policy_unbind()
338 * this policy and anything else in that case in stp_policy_unbind()
340 if (WARN_ON_ONCE(!policy->stm)) in stp_policy_unbind()
345 stm->policy = NULL; in stp_policy_unbind()
346 policy->stm = NULL; in stp_policy_unbind()
358 struct stp_policy *policy = to_stp_policy(item); in stp_policy_release() local
359 struct stm_device *stm = policy->stm; in stp_policy_release()
361 /* a policy *can* be unbound and still exist in configfs tree */ in stp_policy_release()
366 stp_policy_unbind(policy); in stp_policy_release()
369 kfree(policy); in stp_policy_release()
440 if (stm->policy) { in stp_policy_make()
445 stm->policy = kzalloc(sizeof(*stm->policy), GFP_KERNEL); in stp_policy_make()
446 if (!stm->policy) { in stp_policy_make()
451 config_group_init_type_name(&stm->policy->group, name, in stp_policy_make()
456 stm->policy->stm = stm; in stp_policy_make()
457 ret = &stm->policy->group; in stp_policy_make()
486 .ci_namebuf = "stp-policy",
493 * Lock the policy mutex from the outside
496 __stp_policy_node_lookup(struct stp_policy *policy, char *s) in __stp_policy_node_lookup() argument
499 struct list_head *head = &policy->group.cg_children; in __stp_policy_node_lookup()
545 if (stm->policy) in stp_policy_node_lookup()
546 policy_node = __stp_policy_node_lookup(stm->policy, s); in stp_policy_node_lookup()