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;
110 stm = policy_node->policy->stm;
157 stm = policy_node->policy->stm;
228 struct stp_policy *policy;
231 policy = container_of(group, struct stp_policy, group);
235 policy = parent_node->policy;
238 if (!policy->stm)
241 pdrv = policy->stm->pdrv;
251 if (policy->stm->pdrv_node_type)
252 type = policy->stm->pdrv_node_type;
256 policy_node->policy = policy;
259 policy_node->first_master = policy->stm->data->sw_start;
260 policy_node->last_master = policy->stm->data->sw_end;
262 policy_node->last_channel = policy->stm->data->sw_nchannels - 1;
291 struct stp_policy *policy = to_stp_policy(item);
295 (policy && policy->stm) ?
296 policy->stm->data->name :
307 struct stp_policy *policy = to_stp_policy(item);
311 (policy && policy->stm) ?
312 policy->stm->pdrv->name :
326 void stp_policy_unbind(struct stp_policy *policy)
328 struct stm_device *stm = policy->stm;
331 * stp_policy_release() will not call here if the policy is already
333 * this policy and anything else in that case
335 if (WARN_ON_ONCE(!policy->stm))
340 stm->policy = NULL;
341 policy->stm = NULL;
353 struct stp_policy *policy = to_stp_policy(item);
354 struct stm_device *stm = policy->stm;
356 /* a policy *can* be unbound and still exist in configfs tree */
361 stp_policy_unbind(policy);
364 kfree(policy);
435 if (stm->policy) {
440 stm->policy = kzalloc(sizeof(*stm->policy), GFP_KERNEL);
441 if (!stm->policy) {
446 config_group_init_type_name(&stm->policy->group, name,
451 stm->policy->stm = stm;
452 ret = &stm->policy->group;
481 .ci_namebuf = "stp-policy",
488 * Lock the policy mutex from the outside
491 __stp_policy_node_lookup(struct stp_policy *policy, char *s)
494 struct list_head *head = &policy->group.cg_children;
540 if (stm->policy)
541 policy_node = __stp_policy_node_lookup(stm->policy, s);