Lines Matching full:bdf
311 /* maximum and minimum bdf allowed by PMU */
318 #define GET_PCI_DEVFN(bdf) ((bdf) & 0xff) argument
336 HNS3_PMU_FILTER_ATTR(bdf, config1, 8, 23);
490 u16 bdf = hns3_pmu->bdf_min; in bdf_min_show() local
492 return sysfs_emit(buf, "%02x:%02x.%x\n", PCI_BUS_NUM(bdf), in bdf_min_show()
493 PCI_SLOT(bdf), PCI_FUNC(bdf)); in bdf_min_show()
501 u16 bdf = hns3_pmu->bdf_max; in bdf_max_show() local
503 return sysfs_emit(buf, "%02x:%02x.%x\n", PCI_BUS_NUM(bdf), in bdf_max_show()
504 PCI_SLOT(bdf), PCI_FUNC(bdf)); in bdf_max_show()
667 HNS3_PMU_FORMAT_ATTR(bdf, "config1:8-23"),
824 static bool hns3_pmu_valid_bdf(struct hns3_pmu *hns3_pmu, u16 bdf) in hns3_pmu_valid_bdf() argument
828 if (bdf < hns3_pmu->bdf_min || bdf > hns3_pmu->bdf_max) { in hns3_pmu_valid_bdf()
829 pci_err(hns3_pmu->pdev, "Invalid EP device: %#x!\n", bdf); in hns3_pmu_valid_bdf()
834 PCI_BUS_NUM(bdf), in hns3_pmu_valid_bdf()
835 GET_PCI_DEVFN(bdf)); in hns3_pmu_valid_bdf()
837 pci_err(hns3_pmu->pdev, "Nonexistent EP device: %#x!\n", bdf); in hns3_pmu_valid_bdf()
845 static void hns3_pmu_set_qid_para(struct hns3_pmu *hns3_pmu, u32 idx, u16 bdf, in hns3_pmu_set_qid_para() argument
850 val = GET_PCI_DEVFN(bdf); in hns3_pmu_set_qid_para()
882 static bool hns3_pmu_valid_queue(struct hns3_pmu *hns3_pmu, u32 idx, u16 bdf, in hns3_pmu_valid_queue() argument
885 hns3_pmu_set_qid_para(hns3_pmu, idx, bdf, queue); in hns3_pmu_valid_queue()
915 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_set_func_mode() local
917 if (!hns3_pmu_valid_bdf(hns3_pmu, bdf)) in hns3_pmu_set_func_mode()
930 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_set_func_queue_mode() local
932 if (!hns3_pmu_valid_bdf(hns3_pmu, bdf)) in hns3_pmu_set_func_queue_mode()
935 if (!hns3_pmu_valid_queue(hns3_pmu, hwc->idx, bdf, queue_id)) { in hns3_pmu_set_func_queue_mode()
961 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_is_enabled_func_mode() local
968 return bdf; in hns3_pmu_is_enabled_func_mode()
976 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_is_enabled_func_queue_mode() local
983 return bdf; in hns3_pmu_is_enabled_func_queue_mode()
1014 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_is_enabled_func_intr_mode() local
1019 return hns3_pmu_valid_bdf(hns3_pmu, bdf); in hns3_pmu_is_enabled_func_intr_mode()
1104 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_get_filter_condition() local
1116 return GET_PCI_DEVFN(bdf); in hns3_pmu_get_filter_condition()
1118 return FILTER_CONDITION_FUNC_INTR(GET_PCI_DEVFN(bdf), intr_id); in hns3_pmu_get_filter_condition()
1134 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_config_filter() local
1148 hns3_pmu_set_qid_para(hns3_pmu, idx, bdf, queue_id); in hns3_pmu_config_filter()