Lines Matching refs:model
35 #define CCI_PMU_CNTR_SIZE(model) ((model)->cntr_size)
36 #define CCI_PMU_CNTR_BASE(model, idx) ((idx) * CCI_PMU_CNTR_SIZE(model))
40 #define CCI_PMU_MAX_HW_CNTRS(model) \
41 ((model)->num_hw_cntrs + (model)->fixed_hw_cntrs)
104 const struct cci_pmu_model *model;
362 if (ev_code >= cci_pmu->model->event_ranges[if_type].min &&
363 ev_code <= cci_pmu->model->event_ranges[if_type].max)
573 if (ev_code >= cci_pmu->model->event_ranges[if_type].min &&
574 ev_code <= cci_pmu->model->event_ranges[if_type].max)
625 if (ev_code >= cci_pmu->model->event_ranges[if_type].min &&
626 ev_code <= cci_pmu->model->event_ranges[if_type].max)
717 CCI_PMU_CNTR_BASE(cci_pmu->model, idx) + offset);
724 CCI_PMU_CNTR_BASE(cci_pmu->model, idx) + offset);
802 if (cci_pmu->model->get_event_idx)
803 return cci_pmu->model->get_event_idx(cci_pmu, hw, cci_event);
819 !cci_pmu->model->validate_hw_event)
822 return cci_pmu->model->validate_hw_event(cci_pmu, event->attr.config);
909 if (cci_pmu->model->write_counters)
910 cci_pmu->model->write_counters(cci_pmu, mask);
1126 return (idx >= 0) && (idx < cci_pmu->model->fixed_hw_cntrs);
1398 const struct cci_pmu_model *model = cci_pmu->model;
1399 char *name = model->name;
1402 if (WARN_ON(model->num_hw_cntrs > NUM_HW_CNTRS_MAX))
1404 if (WARN_ON(model->fixed_hw_cntrs > FIXED_HW_CNTRS_MAX))
1407 pmu_event_attr_group.attrs = model->event_attrs;
1408 pmu_format_attr_group.attrs = model->format_attrs;
1412 .name = cci_pmu->model->name,
1428 if (num_cntrs > cci_pmu->model->num_hw_cntrs) {
1431 " the model(%d), truncated.",
1432 num_cntrs, cci_pmu->model->num_hw_cntrs);
1433 num_cntrs = cci_pmu->model->num_hw_cntrs;
1435 cci_pmu->num_cntrs = num_cntrs + cci_pmu->model->fixed_hw_cntrs;
1594 const struct cci_pmu_model *model;
1607 model = of_device_get_match_data(dev);
1608 if (!model) {
1611 model = probe_cci_model(cci_pmu);
1613 if (!model) {
1618 cci_pmu->model = model;
1619 cci_pmu->irqs = devm_kcalloc(dev, CCI_PMU_MAX_HW_CNTRS(model),
1624 CCI_PMU_MAX_HW_CNTRS(model),
1630 CCI_PMU_MAX_HW_CNTRS(model),
1656 for (i = 0; i < CCI_PMU_MAX_HW_CNTRS(cci_pmu->model); i++) {
1671 if (i < CCI_PMU_MAX_HW_CNTRS(cci_pmu->model)) {
1673 i, CCI_PMU_MAX_HW_CNTRS(cci_pmu->model));
1691 pr_info("ARM %s PMU driver probed", cci_pmu->model->name);