]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/amd: Remove unused amd_iommus variable
authorVasant Hegde <vasant.hegde@amd.com>
Wed, 30 Oct 2024 06:35:49 +0000 (06:35 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 30 Oct 2024 10:06:43 +0000 (11:06 +0100)
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>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c

index f88f6e4e910fe56e448a442503c3cd1f68db7a46..f44de5f316257546c86dca5f88f46b21cf7fe68b 100644 (file)
@@ -877,12 +877,6 @@ extern struct list_head amd_iommu_pci_seg_list;
  */
 extern struct list_head amd_iommu_list;
 
-/*
- * Array with pointers to each IOMMU struct
- * The indices are referenced in the protection domains
- */
-extern struct amd_iommu *amd_iommus[MAX_IOMMUS];
-
 /*
  * Structure defining one entry in the device table
  */
index 939b011d6ff2aa3a420a1ac96b8e86240b9f2e8d..0e0a531042acb309473d1546eb92b6060e864d7d 100644 (file)
@@ -177,9 +177,6 @@ LIST_HEAD(amd_iommu_pci_seg_list);  /* list of all PCI segments */
 LIST_HEAD(amd_iommu_list);             /* list of all AMD IOMMUs in the
                                           system */
 
-/* Array to assign indices to IOMMUs*/
-struct amd_iommu *amd_iommus[MAX_IOMMUS];
-
 /* Number of IOMMUs present in the system */
 static int amd_iommus_present;
 
@@ -1743,9 +1740,6 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h,
                return -ENOSYS;
        }
 
-       /* Index is fine - add IOMMU to the array */
-       amd_iommus[iommu->index] = iommu;
-
        /*
         * Copy data from ACPI table entry to the iommu struct
         */