summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd_iommu_types.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-11-10 14:41:57 +0100
committerHiroshi DOYU <hdoyu@nvidia.com>2012-01-23 11:11:39 +0200
commit59341c8f37805b35d24c5295acf3899c7af87dde (patch)
treedcc0a0ab93295894a42aaffe51cce2424dfa9cff /drivers/iommu/amd_iommu_types.h
parenta6e9db8acd90b1ccf4a4c67399614bc2fd904145 (diff)
iommu/amd: Get the maximum number of PASIDs supported
Read the number of PASIDs supported by each IOMMU in the system and take the smallest number as the maximum value supported by the IOMMU driver. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/amd_iommu_types.h')
-rw-r--r--drivers/iommu/amd_iommu_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index f8dd9ae693d1..0d984ca925be 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -87,6 +87,9 @@
#define FEATURE_HE (1ULL<<8)
#define FEATURE_PC (1ULL<<9)
+#define FEATURE_PASID_SHIFT 32
+#define FEATURE_PASID_MASK (0x1fULL << FEATURE_PASID_SHIFT)
+
/* MMIO status bits */
#define MMIO_STATUS_COM_WAIT_INT_MASK 0x04
@@ -549,6 +552,9 @@ extern unsigned long *amd_iommu_pd_alloc_bitmap;
*/
extern bool amd_iommu_unmap_flush;
+/* Smallest number of PASIDs supported by any IOMMU in the system */
+extern u32 amd_iommu_max_pasids;
+
/* takes bus and device/function and returns the device id
* FIXME: should that be in generic PCI code? */
static inline u16 calc_devid(u8 bus, u8 devfn)