Lines Matching refs:grp_p
55 n2piu_grp_t *grp_p;
65 grp_p = *grp_pp;
67 N2PIUPC_DBG2("Setting up group for %s\n", grp_p->grp_name);
70 grp_p->name_kstats_pp = kmem_zalloc((grp_p->num_counters *
72 if (n2piupc_create_name_kstat(grp_p) != DDI_SUCCESS) {
91 n2piu_grp_t *grp_p;
106 grp_p = *grp_pp;
117 ksinfo_p->grp_p = grp_p;
123 ksinfo_p->cntr_ksp = n2piupc_create_cntr_kstat(grp_p->grp_name,
125 n2piupc_kstat_update, ksinfo_p, grp_p->num_counters);
151 n2piupc_create_name_kstat(n2piu_grp_t *grp_p)
155 for (i = 0; i < grp_p->num_counters; i++) {
156 grp_p->name_kstats_pp[i] = n2piupc_create_picN_kstat(
157 grp_p->grp_name, i,
158 grp_p->regsel_p->fields_p[i].event_offset,
159 grp_p->regsel_p->fields_p[i].num_events,
160 grp_p->regsel_p->fields_p[i].events_p);
162 if (grp_p->name_kstats_pp[i] == NULL)
333 n2piupc_perfcnt_program(n2piupc_t *n2piupc_p, n2piu_grp_t *grp_p,
345 if ((rval = n2piupc_read(n2piupc_p, grp_p->regsel_p->regoff,
349 grp_p->regsel_p->regoff);
355 for (counter = 0; counter < grp_p->num_counters; counter++) {
357 if (grp_p->counters_p[counter].zero_regoff == NO_REGISTER)
360 event_mask = grp_p->regsel_p->fields_p[counter].event_mask <<
361 grp_p->regsel_p->fields_p[counter].event_offset;
367 grp_p->grp_name, counter,
368 grp_p->counters_p[counter].zero_regoff,
378 grp_p->counters_p[counter].zero_regoff,
379 grp_p->counters_p[counter].zero_value)) != SUCCESS)
385 grp_p->regsel_p->regoff, new_events);
386 if ((rval = n2piupc_write(n2piupc_p, grp_p->regsel_p->regoff,
391 grp_p->regsel_p->regoff);
410 n2piu_grp_t *grp_p = ksinfop->grp_p;
426 if (grp_p->regsel_p->regoff != NO_REGISTER) {
429 if (n2piupc_perfcnt_program(n2piupc_p, grp_p,
437 if (grp_p->regsel_p->regoff != NO_REGISTER) {
440 if (n2piupc_read(n2piupc_p, grp_p->regsel_p->regoff,
449 for (counter = 0; counter < grp_p->num_counters; counter++) {
451 grp_p->counters_p[counter].regoff,
456 grp_p->counters_p[counter].regoff,
467 n2piu_grp_t *grp_p;
473 grp_p = *grp_pp;
474 if (grp_p->name_kstats_pp != NULL) {
475 n2piupc_delete_name_kstats(grp_p->name_kstats_pp,
476 grp_p->num_counters);
477 kmem_free(grp_p->name_kstats_pp,
478 grp_p->num_counters * sizeof (kstat_t));
479 grp_p->name_kstats_pp = NULL;