Skip to content

Commit b73c698

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Remove unused amd_iommus variable
protection_domain structure is updated to use xarray to track the IOMMUs attached to the domain. Now domain flush code is not using amd_iommus. Hence remove this unused variable. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Joerg Roedel <jroedel@suse.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20241030063556.6104-6-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent d160411 commit b73c698

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

drivers/iommu/amd/amd_iommu_types.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,6 @@ extern struct list_head amd_iommu_pci_seg_list;
877877
*/
878878
extern struct list_head amd_iommu_list;
879879

880-
/*
881-
* Array with pointers to each IOMMU struct
882-
* The indices are referenced in the protection domains
883-
*/
884-
extern struct amd_iommu *amd_iommus[MAX_IOMMUS];
885-
886880
/*
887881
* Structure defining one entry in the device table
888882
*/

drivers/iommu/amd/init.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ LIST_HEAD(amd_iommu_pci_seg_list); /* list of all PCI segments */
177177
LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the
178178
system */
179179

180-
/* Array to assign indices to IOMMUs*/
181-
struct amd_iommu *amd_iommus[MAX_IOMMUS];
182-
183180
/* Number of IOMMUs present in the system */
184181
static int amd_iommus_present;
185182

@@ -1743,9 +1740,6 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h,
17431740
return -ENOSYS;
17441741
}
17451742

1746-
/* Index is fine - add IOMMU to the array */
1747-
amd_iommus[iommu->index] = iommu;
1748-
17491743
/*
17501744
* Copy data from ACPI table entry to the iommu struct
17511745
*/

0 commit comments

Comments
 (0)