summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd/amd_iommu_types.h
diff options
context:
space:
mode:
authorVasant Hegde <vasant.hegde@amd.com>2024-04-18 13:33:51 +0300
committerJoerg Roedel <jroedel@suse.de>2024-04-26 13:15:59 +0300
commita0c47f233e683e6a81fced5c9c9cef6fa0da9446 (patch)
tree8e1c92c6bae431585c4306eb3e193dc6995e7ab1 /drivers/iommu/amd/amd_iommu_types.h
parent7c5b7176f0c3996adbe853adb1f857bd4f82b1e2 (diff)
downloadlinux-a0c47f233e683e6a81fced5c9c9cef6fa0da9446.tar.xz
iommu/amd: Introduce iommu_dev_data.max_pasids
This variable will track the number of PASIDs supported by the device. If IOMMU or device doesn't support PASID then it will be zero. This will be used while allocating GCR3 table to decide required number of PASID table levels. Also in PASID bind path it will use this variable to check whether device supports PASID or not. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20240418103400.6229-7-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd/amd_iommu_types.h')
-rw-r--r--drivers/iommu/amd/amd_iommu_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index d1fed5fc219b..03442e86ae44 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -813,6 +813,7 @@ struct iommu_dev_data {
struct device *dev;
u16 devid; /* PCI Device ID */
+ u32 max_pasids; /* Max supported PASIDs */
u32 flags; /* Holds AMD_IOMMU_DEVICE_FLAG_<*> */
int ats_qdep;
u8 ats_enabled :1; /* ATS state */