Lines Matching refs:model

83 #define CCI_PMU_CNTR_SIZE(model)	((model)->cntr_size)  argument
84 #define CCI_PMU_CNTR_BASE(model, idx) ((idx) * CCI_PMU_CNTR_SIZE(model)) argument
88 #define CCI_PMU_MAX_HW_CNTRS(model) \ argument
89 ((model)->num_hw_cntrs + (model)->fixed_hw_cntrs)
141 const struct cci_pmu_model *model; member
391 if (ev_code >= cci_pmu->model->event_ranges[if_type].min && in cci400_validate_hw_event()
392 ev_code <= cci_pmu->model->event_ranges[if_type].max) in cci400_validate_hw_event()
596 if (ev_code >= cci_pmu->model->event_ranges[if_type].min && in cci500_validate_hw_event()
597 ev_code <= cci_pmu->model->event_ranges[if_type].max) in cci500_validate_hw_event()
630 CCI_PMU_CNTR_BASE(cci_pmu->model, idx) + offset); in pmu_read_register()
637 CCI_PMU_CNTR_BASE(cci_pmu->model, idx) + offset); in pmu_write_register()
671 if (cci_pmu->model->get_event_idx) in pmu_get_event_idx()
672 return cci_pmu->model->get_event_idx(cci_pmu, hw, cci_event); in pmu_get_event_idx()
688 !cci_pmu->model->validate_hw_event) in pmu_map_event()
691 return cci_pmu->model->validate_hw_event(cci_pmu, event->attr.config); in pmu_map_event()
914 return (idx >= 0) && (idx < cci_pmu->model->fixed_hw_cntrs); in pmu_fixed_hw_idx()
1239 const struct cci_pmu_model *model = cci_pmu->model; in cci_pmu_init_attrs() local
1247 if (model->nevent_attrs) { in cci_pmu_init_attrs()
1248 attrs = alloc_attrs(pdev, model->nevent_attrs, in cci_pmu_init_attrs()
1249 model->event_attrs); in cci_pmu_init_attrs()
1254 if (model->nformat_attrs) { in cci_pmu_init_attrs()
1255 attrs = alloc_attrs(pdev, model->nformat_attrs, in cci_pmu_init_attrs()
1256 model->format_attrs); in cci_pmu_init_attrs()
1268 char *name = cci_pmu->model->name; in cci_pmu_init()
1277 .name = cci_pmu->model->name, in cci_pmu_init()
1292 if (num_cntrs > cci_pmu->model->num_hw_cntrs) { in cci_pmu_init()
1296 num_cntrs, cci_pmu->model->num_hw_cntrs); in cci_pmu_init()
1297 num_cntrs = cci_pmu->model->num_hw_cntrs; in cci_pmu_init()
1299 cci_pmu->num_cntrs = num_cntrs + cci_pmu->model->fixed_hw_cntrs; in cci_pmu_init()
1459 const struct cci_pmu_model *model; in cci_pmu_alloc() local
1466 model = get_cci_model(pdev); in cci_pmu_alloc()
1467 if (!model) { in cci_pmu_alloc()
1476 cci_pmu->model = model; in cci_pmu_alloc()
1477 cci_pmu->irqs = devm_kcalloc(&pdev->dev, CCI_PMU_MAX_HW_CNTRS(model), in cci_pmu_alloc()
1482 CCI_PMU_MAX_HW_CNTRS(model), in cci_pmu_alloc()
1488 BITS_TO_LONGS(CCI_PMU_MAX_HW_CNTRS(model)), in cci_pmu_alloc()
1518 for (i = 0; i < CCI_PMU_MAX_HW_CNTRS(cci_pmu->model); i++) { in cci_pmu_probe()
1533 if (i < CCI_PMU_MAX_HW_CNTRS(cci_pmu->model)) { in cci_pmu_probe()
1535 i, CCI_PMU_MAX_HW_CNTRS(cci_pmu->model)); in cci_pmu_probe()
1563 pr_info("ARM %s PMU driver probed", cci_pmu->model->name); in cci_pmu_probe()