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