iommu/amd: Initialize iommu_device->max_pasids
authorVasant Hegde <vasant.hegde@amd.com>
Thu, 21 Sep 2023 09:21:47 +0000 (09:21 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 25 Sep 2023 10:39:07 +0000 (12:39 +0200)
commit7016b3005547bae3ba4577980db0ede53a79784a
treea58a256cd9efab09bdd0eb6245c7f30a03b299cb
parenteda8c2860ab6799620c6fbb8600d56e32f437a90
iommu/amd: Initialize iommu_device->max_pasids

Commit 1adf3cc20d69 ("iommu: Add max_pasids field in struct iommu_device")
introduced a variable struct iommu_device.max_pasids to track max
PASIDS supported by each IOMMU.

Let us initialize this field for AMD IOMMU. IOMMU core will use this value
to set max PASIDs per device (see __iommu_probe_device()).

Also remove unused global 'amd_iommu_max_pasid' variable.

Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20230921092147.5930-15-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c