Loading include/linux/iommu.h +12 −0 Original line number Original line Diff line number Diff line Loading @@ -181,6 +181,7 @@ extern struct dentry *iommu_debugfs_top; * @trigger_fault: trigger a fault on the device attached to an iommu domain * @trigger_fault: trigger a fault on the device attached to an iommu domain * @reg_read: read an IOMMU register * @reg_read: read an IOMMU register * @reg_write: write an IOMMU register * @reg_write: write an IOMMU register * @tlbi_domain: Invalidate all TLBs covering an iommu domain */ */ struct iommu_ops { struct iommu_ops { bool (*capable)(enum iommu_cap); bool (*capable)(enum iommu_cap); Loading Loading @@ -227,6 +228,7 @@ struct iommu_ops { unsigned long offset); unsigned long offset); void (*reg_write)(struct iommu_domain *domain, unsigned long val, void (*reg_write)(struct iommu_domain *domain, unsigned long val, unsigned long offset); unsigned long offset); void (*tlbi_domain)(struct iommu_domain *domain); int (*of_xlate)(struct device *dev, struct of_phandle_args *args); int (*of_xlate)(struct device *dev, struct of_phandle_args *args); Loading Loading @@ -376,6 +378,12 @@ extern struct iommu_group *pci_device_group(struct device *dev); /* Generic device grouping function */ /* Generic device grouping function */ extern struct iommu_group *generic_device_group(struct device *dev); extern struct iommu_group *generic_device_group(struct device *dev); static inline void iommu_tlbiall(struct iommu_domain *domain) { if (domain->ops->tlbi_domain) domain->ops->tlbi_domain(domain); } #else /* CONFIG_IOMMU_API */ #else /* CONFIG_IOMMU_API */ struct iommu_ops {}; struct iommu_ops {}; Loading Loading @@ -608,6 +616,10 @@ static inline void iommu_reg_write(struct iommu_domain *domain, { { } } static inline void iommu_tlbiall(struct iommu_domain *domain) { } #endif /* CONFIG_IOMMU_API */ #endif /* CONFIG_IOMMU_API */ #endif /* __LINUX_IOMMU_H */ #endif /* __LINUX_IOMMU_H */ Loading
include/linux/iommu.h +12 −0 Original line number Original line Diff line number Diff line Loading @@ -181,6 +181,7 @@ extern struct dentry *iommu_debugfs_top; * @trigger_fault: trigger a fault on the device attached to an iommu domain * @trigger_fault: trigger a fault on the device attached to an iommu domain * @reg_read: read an IOMMU register * @reg_read: read an IOMMU register * @reg_write: write an IOMMU register * @reg_write: write an IOMMU register * @tlbi_domain: Invalidate all TLBs covering an iommu domain */ */ struct iommu_ops { struct iommu_ops { bool (*capable)(enum iommu_cap); bool (*capable)(enum iommu_cap); Loading Loading @@ -227,6 +228,7 @@ struct iommu_ops { unsigned long offset); unsigned long offset); void (*reg_write)(struct iommu_domain *domain, unsigned long val, void (*reg_write)(struct iommu_domain *domain, unsigned long val, unsigned long offset); unsigned long offset); void (*tlbi_domain)(struct iommu_domain *domain); int (*of_xlate)(struct device *dev, struct of_phandle_args *args); int (*of_xlate)(struct device *dev, struct of_phandle_args *args); Loading Loading @@ -376,6 +378,12 @@ extern struct iommu_group *pci_device_group(struct device *dev); /* Generic device grouping function */ /* Generic device grouping function */ extern struct iommu_group *generic_device_group(struct device *dev); extern struct iommu_group *generic_device_group(struct device *dev); static inline void iommu_tlbiall(struct iommu_domain *domain) { if (domain->ops->tlbi_domain) domain->ops->tlbi_domain(domain); } #else /* CONFIG_IOMMU_API */ #else /* CONFIG_IOMMU_API */ struct iommu_ops {}; struct iommu_ops {}; Loading Loading @@ -608,6 +616,10 @@ static inline void iommu_reg_write(struct iommu_domain *domain, { { } } static inline void iommu_tlbiall(struct iommu_domain *domain) { } #endif /* CONFIG_IOMMU_API */ #endif /* CONFIG_IOMMU_API */ #endif /* __LINUX_IOMMU_H */ #endif /* __LINUX_IOMMU_H */