iommu/amd: Introduce get_device_sbdf_id() helper function
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Wed, 6 Jul 2022 11:38:19 +0000 (17:08 +0530)
committerJoerg Roedel <jroedel@suse.de>
Thu, 7 Jul 2022 07:37:50 +0000 (09:37 +0200)
commitbf87972ca664863dcfd38ab581589c1d87677cb6
tree0d48c0d94163ab6d534ff4a8e2eb5de3e77355e3
parenta3cf6ab35751ea77a2bd47636dca761e835b282d
iommu/amd: Introduce get_device_sbdf_id() helper function

Current get_device_id() only provide 16-bit PCI device ID (i.e. BDF).
With multiple PCI segment support, we need to extend the helper function
to include PCI segment ID.

So, introduce a new helper function get_device_sbdf_id() to replace
the current get_pci_device_id().

Co-developed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20220706113825.25582-30-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/iommu.c