Lines Matching refs:pmu

86 	struct pmu *pmu; /* for custom pmu ops */
125 struct pmu pmu;
154 struct intel_uncore_pmu *pmu;
223 return container_of(dev_get_drvdata(dev), struct intel_uncore_pmu, pmu);
263 if (offset < box->pmu->type->mmio_map_size)
267 offset, box->pmu->type->name);
275 return box->pmu->type->box_ctl +
276 box->pmu->type->mmio_offset * box->pmu->pmu_idx;
281 return box->pmu->type->box_ctl;
286 return box->pmu->type->fixed_ctl;
291 return box->pmu->type->fixed_ctr;
298 return idx * 8 + box->pmu->type->event_ctl;
300 return idx * 4 + box->pmu->type->event_ctl;
306 return idx * 8 + box->pmu->type->perf_ctr;
311 struct intel_uncore_pmu *pmu = box->pmu;
312 return pmu->type->msr_offsets ?
313 pmu->type->msr_offsets[pmu->pmu_idx] :
314 pmu->type->msr_offset * pmu->pmu_idx;
319 if (!box->pmu->type->box_ctl)
321 return box->pmu->type->box_ctl + uncore_msr_box_offset(box);
326 if (!box->pmu->type->fixed_ctl)
328 return box->pmu->type->fixed_ctl + uncore_msr_box_offset(box);
333 return box->pmu->type->fixed_ctr + uncore_msr_box_offset(box);
383 struct intel_uncore_pmu *pmu = box->pmu;
385 return pmu->type->freerunning[type].counter_base +
386 pmu->type->freerunning[type].counter_offset * idx +
387 (pmu->type->freerunning[type].box_offsets ?
388 pmu->type->freerunning[type].box_offsets[pmu->pmu_idx] :
389 pmu->type->freerunning[type].box_offset * pmu->pmu_idx);
397 (box->pmu->type->pair_ctr_ctl ? 2 * idx : idx);
399 return box->pmu->type->event_ctl +
400 (box->pmu->type->pair_ctr_ctl ? 2 * idx : idx) +
410 (box->pmu->type->pair_ctr_ctl ? 2 * idx : idx);
412 return box->pmu->type->perf_ctr +
413 (box->pmu->type->pair_ctr_ctl ? 2 * idx : idx) +
456 return box->pmu->type->perf_ctr_bits;
461 return box->pmu->type->fixed_ctr_bits;
470 return box->pmu->type->freerunning[type].bits;
478 return box->pmu->type->freerunning[type].num_counters;
484 return box->pmu->type->num_freerunning_types;
499 return box->pmu->type->num_counters;
523 box->pmu->type->ops->disable_event(box, event);
529 box->pmu->type->ops->enable_event(box, event);
535 return box->pmu->type->ops->read_counter(box, event);
541 if (box->pmu->type->ops->init_box)
542 box->pmu->type->ops->init_box(box);
549 if (box->pmu->type->ops->exit_box)
550 box->pmu->type->ops->exit_box(box);
561 return container_of(event->pmu, struct intel_uncore_pmu, pmu);
569 struct intel_uncore_box *uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu);
586 void uncore_get_alias_name(char *pmu_name, struct intel_uncore_pmu *pmu);