]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Introduce per PCI segment last_bdf
authorVasant Hegde <vasant.hegde@amd.com>
Wed, 6 Jul 2022 11:38:00 +0000 (17:08 +0530)
committerJoerg Roedel <jroedel@suse.de>
Thu, 7 Jul 2022 07:37:39 +0000 (09:37 +0200)
commit41ec75aa66bf30490734aa411a7a4ed324822133
treeaea6b5ce0b58f9e9b61728c82a4c4494ef31a19b
parent6d0287454a5df8c8da3ee42478b32eda3a50b05d
iommu/amd: Introduce per PCI segment last_bdf

Current code uses global "amd_iommu_last_bdf" to track the last bdf
supported by the system. This value is used for various memory
allocation, device data flushing, etc.

Introduce per PCI segment last_bdf which will be used to track last bdf
supported by the given PCI segment and use this value for all per
segment memory allocations. Eventually it will replace global
"amd_iommu_last_bdf".

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