aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-01-17 11:01:01 +0100
committerJoerg Roedel <jroedel@suse.de>2020-01-17 11:01:01 +0100
commit6855d1ba7537e21e8f36988bad36d1ad76841f1d (patch)
treeeaffe991a923ec4c77cec99e46f71f7f7868814b /include/linux/iommu.h
parentiommu/arm-smmu: Update my email address in MODULE_AUTHOR() (diff)
parentPCI/ATS: Add PASID stubs (diff)
downloadwireguard-linux-6855d1ba7537e21e8f36988bad36d1ad76841f1d.tar.xz
wireguard-linux-6855d1ba7537e21e8f36988bad36d1ad76841f1d.zip
Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu
Arm SMMU updates for 5.6 - Support for building, and {un,}loading the SMMU drivers as modules - Minor cleanups - SMMUv3: * Non-critical fix to encoding of TLBI_NH_VA invalidation command * Fix broken sanity check on size of MMIO resource during probe * Support for Substream IDs which will soon be provided by PCI PASIDs - io-pgtable: * Finish off the TTBR1 preparation work partially merged last cycle * Ensure correct memory attributes for non-cacheable mappings - SMMU: * Namespace public #defines to avoid collisions with arch/arm64/ * Avoid using valid SMR register when probing mask size
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index e9f94d3f7a04..c1ad15228447 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -388,12 +388,19 @@ void iommu_device_sysfs_remove(struct iommu_device *iommu);
int iommu_device_link(struct iommu_device *iommu, struct device *link);
void iommu_device_unlink(struct iommu_device *iommu, struct device *link);
-static inline void iommu_device_set_ops(struct iommu_device *iommu,
- const struct iommu_ops *ops)
+static inline void __iommu_device_set_ops(struct iommu_device *iommu,
+ const struct iommu_ops *ops)
{
iommu->ops = ops;
}
+#define iommu_device_set_ops(iommu, ops) \
+do { \
+ struct iommu_ops *__ops = (struct iommu_ops *)(ops); \
+ __ops->owner = THIS_MODULE; \
+ __iommu_device_set_ops(iommu, __ops); \
+} while (0)
+
static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
struct fwnode_handle *fwnode)
{
@@ -572,6 +579,7 @@ struct iommu_group *fsl_mc_device_group(struct device *dev);
* @ops: ops for this device's IOMMU
* @iommu_fwnode: firmware handle for this device's IOMMU
* @iommu_priv: IOMMU driver private data for this device
+ * @num_pasid_bits: number of PASID bits supported by this device
* @num_ids: number of associated device IDs
* @ids: IDs which this device may present to the IOMMU
*/
@@ -580,6 +588,7 @@ struct iommu_fwspec {
struct fwnode_handle *iommu_fwnode;
void *iommu_priv;
u32 flags;
+ u32 num_pasid_bits;
unsigned int num_ids;
u32 ids[1];
};