diff options
author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2022-07-06 14:38:12 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-07-07 10:37:46 +0300 |
commit | ccbb091f3f2019c803480bb4ed63c84869da68dc (patch) | |
tree | 0bad2761c82eefa4add73c15b0206187c51b92c9 | |
parent | 54625ef1db1ce7e57f356d8f355095a4fbb71efb (diff) | |
download | linux-ccbb091f3f2019c803480bb4ed63c84869da68dc.tar.xz |
iommu/amd: Update iommu_ignore_device
Start using per PCI segment device table instead of global
device table.
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-23-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/amd/iommu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 493cda5e0246..90755da7cff0 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -413,15 +413,15 @@ static int iommu_init_device(struct amd_iommu *iommu, struct device *dev) static void iommu_ignore_device(struct amd_iommu *iommu, struct device *dev) { struct amd_iommu_pci_seg *pci_seg = iommu->pci_seg; + struct dev_table_entry *dev_table = get_dev_table(iommu); int devid; - devid = get_device_id(dev); + devid = (get_device_id(dev)) & 0xffff; if (devid < 0) return; - pci_seg->rlookup_table[devid] = NULL; - memset(&amd_iommu_dev_table[devid], 0, sizeof(struct dev_table_entry)); + memset(&dev_table[devid], 0, sizeof(struct dev_table_entry)); setup_aliases(iommu, dev); } |