Lines Matching refs:pmu_ev

152 		struct cxl_pmu_ev_cap *pmu_ev;  in cxl_pmu_parse_caps()  local
171 pmu_ev = devm_kzalloc(dev, sizeof(*pmu_ev), GFP_KERNEL); in cxl_pmu_parse_caps()
172 if (!pmu_ev) in cxl_pmu_parse_caps()
175 pmu_ev->vid = FIELD_GET(CXL_PMU_EVENT_CAP_VENDOR_ID_MSK, eval); in cxl_pmu_parse_caps()
176 pmu_ev->gid = FIELD_GET(CXL_PMU_EVENT_CAP_GROUP_ID_MSK, eval); in cxl_pmu_parse_caps()
178 pmu_ev->msk = events_msk; in cxl_pmu_parse_caps()
179 pmu_ev->counter_idx = i; in cxl_pmu_parse_caps()
181 list_add(&pmu_ev->node, &info->event_caps_fixed); in cxl_pmu_parse_caps()
190 struct cxl_pmu_ev_cap *pmu_ev; in cxl_pmu_parse_caps() local
195 pmu_ev = devm_kzalloc(dev, sizeof(*pmu_ev), GFP_KERNEL); in cxl_pmu_parse_caps()
196 if (!pmu_ev) in cxl_pmu_parse_caps()
200 pmu_ev->vid = FIELD_GET(CXL_PMU_EVENT_CAP_VENDOR_ID_MSK, eval); in cxl_pmu_parse_caps()
201 pmu_ev->gid = FIELD_GET(CXL_PMU_EVENT_CAP_GROUP_ID_MSK, eval); in cxl_pmu_parse_caps()
202 pmu_ev->msk = FIELD_GET(CXL_PMU_EVENT_CAP_SUPPORTED_EVENTS_MSK, eval); in cxl_pmu_parse_caps()
203 pmu_ev->event_idx = j; in cxl_pmu_parse_caps()
204 list_add(&pmu_ev->node, &info->event_caps_configurable); in cxl_pmu_parse_caps()
429 struct cxl_pmu_ev_cap *pmu_ev; in cxl_pmu_find_fixed_counter_ev_cap() local
431 list_for_each_entry(pmu_ev, &info->event_caps_fixed, node) { in cxl_pmu_find_fixed_counter_ev_cap()
432 if (vid != pmu_ev->vid || gid != pmu_ev->gid) in cxl_pmu_find_fixed_counter_ev_cap()
436 if (msk == pmu_ev->msk) in cxl_pmu_find_fixed_counter_ev_cap()
437 return pmu_ev; in cxl_pmu_find_fixed_counter_ev_cap()
446 struct cxl_pmu_ev_cap *pmu_ev; in cxl_pmu_find_config_counter_ev_cap() local
448 list_for_each_entry(pmu_ev, &info->event_caps_configurable, node) { in cxl_pmu_find_config_counter_ev_cap()
449 if (vid != pmu_ev->vid || gid != pmu_ev->gid) in cxl_pmu_find_config_counter_ev_cap()
453 if (msk & ~pmu_ev->msk) in cxl_pmu_find_config_counter_ev_cap()
456 return pmu_ev; in cxl_pmu_find_config_counter_ev_cap()
519 struct cxl_pmu_ev_cap *pmu_ev; in cxl_pmu_get_event_idx() local
528 pmu_ev = cxl_pmu_find_fixed_counter_ev_cap(info, vid, gid, mask); in cxl_pmu_get_event_idx()
529 if (!IS_ERR(pmu_ev)) { in cxl_pmu_get_event_idx()
532 if (!test_bit(pmu_ev->counter_idx, info->used_counter_bm)) { in cxl_pmu_get_event_idx()
533 *counter_idx = pmu_ev->counter_idx; in cxl_pmu_get_event_idx()
539 pmu_ev = cxl_pmu_find_config_counter_ev_cap(info, vid, gid, mask); in cxl_pmu_get_event_idx()
540 if (!IS_ERR(pmu_ev)) { in cxl_pmu_get_event_idx()