Lines Matching refs:bdf
318 #define GET_PCI_DEVFN(bdf) ((bdf) & 0xff) argument
336 HNS3_PMU_FILTER_ATTR(bdf, config1, 8, 23);
480 u16 bdf = hns3_pmu->bdf_min; in bdf_min_show() local
482 return sysfs_emit(buf, "%02x:%02x.%x\n", PCI_BUS_NUM(bdf), in bdf_min_show()
483 PCI_SLOT(bdf), PCI_FUNC(bdf)); in bdf_min_show()
491 u16 bdf = hns3_pmu->bdf_max; in bdf_max_show() local
493 return sysfs_emit(buf, "%02x:%02x.%x\n", PCI_BUS_NUM(bdf), in bdf_max_show()
494 PCI_SLOT(bdf), PCI_FUNC(bdf)); in bdf_max_show()
657 HNS3_PMU_FORMAT_ATTR(bdf, "config1:8-23"),
814 static bool hns3_pmu_valid_bdf(struct hns3_pmu *hns3_pmu, u16 bdf) in hns3_pmu_valid_bdf() argument
818 if (bdf < hns3_pmu->bdf_min || bdf > hns3_pmu->bdf_max) { in hns3_pmu_valid_bdf()
819 pci_err(hns3_pmu->pdev, "Invalid EP device: %#x!\n", bdf); in hns3_pmu_valid_bdf()
824 PCI_BUS_NUM(bdf), in hns3_pmu_valid_bdf()
825 GET_PCI_DEVFN(bdf)); in hns3_pmu_valid_bdf()
827 pci_err(hns3_pmu->pdev, "Nonexistent EP device: %#x!\n", bdf); in hns3_pmu_valid_bdf()
835 static void hns3_pmu_set_qid_para(struct hns3_pmu *hns3_pmu, u32 idx, u16 bdf, in hns3_pmu_set_qid_para() argument
840 val = GET_PCI_DEVFN(bdf); in hns3_pmu_set_qid_para()
872 static bool hns3_pmu_valid_queue(struct hns3_pmu *hns3_pmu, u32 idx, u16 bdf, in hns3_pmu_valid_queue() argument
875 hns3_pmu_set_qid_para(hns3_pmu, idx, bdf, queue); in hns3_pmu_valid_queue()
905 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_set_func_mode() local
907 if (!hns3_pmu_valid_bdf(hns3_pmu, bdf)) in hns3_pmu_set_func_mode()
920 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_set_func_queue_mode() local
922 if (!hns3_pmu_valid_bdf(hns3_pmu, bdf)) in hns3_pmu_set_func_queue_mode()
925 if (!hns3_pmu_valid_queue(hns3_pmu, hwc->idx, bdf, queue_id)) { in hns3_pmu_set_func_queue_mode()
951 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_is_enabled_func_mode() local
958 return bdf; in hns3_pmu_is_enabled_func_mode()
966 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_is_enabled_func_queue_mode() local
973 return bdf; in hns3_pmu_is_enabled_func_queue_mode()
1004 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_is_enabled_func_intr_mode() local
1009 return hns3_pmu_valid_bdf(hns3_pmu, bdf); in hns3_pmu_is_enabled_func_intr_mode()
1106 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_get_filter_condition() local
1118 return GET_PCI_DEVFN(bdf); in hns3_pmu_get_filter_condition()
1120 return FILTER_CONDITION_FUNC_INTR(GET_PCI_DEVFN(bdf), intr_id); in hns3_pmu_get_filter_condition()
1136 u16 bdf = hns3_pmu_get_bdf(event); in hns3_pmu_config_filter() local
1150 hns3_pmu_set_qid_para(hns3_pmu, idx, bdf, queue_id); in hns3_pmu_config_filter()