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;
360 if (ev_code >= cci_pmu->model->event_ranges[if_type].min &&
361 ev_code <= cci_pmu->model->event_ranges[if_type].max)
571 if (ev_code >= cci_pmu->model->event_ranges[if_type].min &&
572 ev_code <= cci_pmu->model->event_ranges[if_type].max)
623 if (ev_code >= cci_pmu->model->event_ranges[if_type].min &&
624 ev_code <= cci_pmu->model->event_ranges[if_type].max)
707 CCI_PMU_CNTR_BASE(cci_pmu->model, idx) + offset);
714 CCI_PMU_CNTR_BASE(cci_pmu->model, idx) + offset);
792 if (cci_pmu->model->get_event_idx)
793 return cci_pmu->model->get_event_idx(cci_pmu, hw, cci_event);
809 !cci_pmu->model->validate_hw_event)
812 return cci_pmu->model->validate_hw_event(cci_pmu, event->attr.config);
899 if (cci_pmu->model->write_counters)
900 cci_pmu->model->write_counters(cci_pmu, mask);
1116 return (idx >= 0) && (idx < cci_pmu->model->fixed_hw_cntrs);
1388 const struct cci_pmu_model *model = cci_pmu->model;
1389 char *name = model->name;
1392 if (WARN_ON(model->num_hw_cntrs > NUM_HW_CNTRS_MAX))
1394 if (WARN_ON(model->fixed_hw_cntrs > FIXED_HW_CNTRS_MAX))
1397 pmu_event_attr_group.attrs = model->event_attrs;
1398 pmu_format_attr_group.attrs = model->format_attrs;
1403 .name = cci_pmu->model->name,
1419 if (num_cntrs > cci_pmu->model->num_hw_cntrs) {
1422 " the model(%d), truncated.",
1423 num_cntrs, cci_pmu->model->num_hw_cntrs);
1424 num_cntrs = cci_pmu->model->num_hw_cntrs;
1426 cci_pmu->num_cntrs = num_cntrs + cci_pmu->model->fixed_hw_cntrs;
1585 const struct cci_pmu_model *model;
1598 model = of_device_get_match_data(dev);
1599 if (!model) {
1602 model = probe_cci_model(cci_pmu);
1604 if (!model) {
1609 cci_pmu->model = model;
1610 cci_pmu->irqs = devm_kcalloc(dev, CCI_PMU_MAX_HW_CNTRS(model),
1615 CCI_PMU_MAX_HW_CNTRS(model),
1621 CCI_PMU_MAX_HW_CNTRS(model),
1647 for (i = 0; i < CCI_PMU_MAX_HW_CNTRS(cci_pmu->model); i++) {
1662 if (i < CCI_PMU_MAX_HW_CNTRS(cci_pmu->model)) {
1664 i, CCI_PMU_MAX_HW_CNTRS(cci_pmu->model));
1682 pr_info("ARM %s PMU driver probed", cci_pmu->model->name);