aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iommu/intel/pasid.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-08-26 13:45:47 -0700
committerJakub Kicinski <kuba@kernel.org>2021-08-26 17:57:57 -0700
commit97c78d0af55fff206947a5f2b85b690b5acf28ce (patch)
tree9799b7594e0f4429919882a684d36ba649e0408b /drivers/iommu/intel/pasid.h
parentMerge branch 'LiteETH-driver' (diff)
parentMerge tag 'nfsd-5.14-1' of git://linux-nfs.org/~bfields/linux (diff)
downloadwireguard-linux-97c78d0af55fff206947a5f2b85b690b5acf28ce.tar.xz
wireguard-linux-97c78d0af55fff206947a5f2b85b690b5acf28ce.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/wwan/mhi_wwan_mbim.c - drop the extra arg. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/iommu/intel/pasid.h')
-rw-r--r--drivers/iommu/intel/pasid.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/intel/pasid.h b/drivers/iommu/intel/pasid.h
index 5ff61c3d401f..c11bc8b833b8 100644
--- a/drivers/iommu/intel/pasid.h
+++ b/drivers/iommu/intel/pasid.h
@@ -99,6 +99,12 @@ static inline bool pasid_pte_is_present(struct pasid_entry *pte)
return READ_ONCE(pte->val[0]) & PASID_PTE_PRESENT;
}
+/* Get PGTT field of a PASID table entry */
+static inline u16 pasid_pte_get_pgtt(struct pasid_entry *pte)
+{
+ return (u16)((READ_ONCE(pte->val[0]) >> 6) & 0x7);
+}
+
extern unsigned int intel_pasid_max_id;
int intel_pasid_alloc_table(struct device *dev);
void intel_pasid_free_table(struct device *dev);