]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Introduce pci segment structure
authorVasant Hegde <vasant.hegde@amd.com>
Wed, 6 Jul 2022 11:37:52 +0000 (17:07 +0530)
committerJoerg Roedel <jroedel@suse.de>
Thu, 7 Jul 2022 07:37:33 +0000 (09:37 +0200)
commit947aecb6823e8b35fd1cddc42a2b98a5fdbbe43f
tree510abee1fe139e564b5f2956ac22565cbda39c63
parent2d83b6f7da7bf0b341f94f2836c18fd1dfd358c4
iommu/amd: Introduce pci segment structure

Newer AMD systems can support multiple PCI segments, where each segment
contains one or more IOMMU instances. However, an IOMMU instance can only
support a single PCI segment.

Current code assumes that system contains only one pci segment (segment 0)
and creates global data structures such as device table, rlookup table,
etc.

Introducing per PCI segment data structure, which contains segment
specific data structures. This will eventually replace the global
data structures.

Also update `amd_iommu->pci_seg` variable to point to PCI segment
structure instead of PCI segment ID.

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-3-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c