iommu: Make iommu-dma helpers private
Subsystems (2)
Robin Murphy
maintainerPATCH 1/1 iommu: Make iommu-dma helpers private
Most of iommu-dma's own internals were privatised a while ago, but there are still a couple of DMA-domain-specific helpers provided by the core code. These now definitely have no reason to be exposed publicly, so move their declarations into the private header.
Signed-off-by Robin Murphy <[email protected]>
--- drivers/iommu/dma-iommu.c | 1 + drivers/iommu/iommu-priv.h | 4 ++++ include/linux/iommu.h | 2 -- 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/iommu/dma-iommu.c +1 -0
@@ -37,6 +37,7 @@#include "dma-iommu.h" #include "iommu-pages.h" +#include "iommu-priv.h" struct iommu_dma_msi_page {struct list_head list;
drivers/iommu/iommu-priv.h +4 -0
@@ -30,6 +30,10 @@ static inline const struct iommu_ops *iommu_fwspec_ops(struct iommu_fwspec *fwspvoid iommu_fwspec_free (struct device *dev); +int iommu_deferred_attach (struct device *dev,struct iommu_domain *domain); + +struct iommu_domain *iommu_get_dma_domain (struct device *dev); + int iommu_device_register_bus(struct iommu_device *iommu, const struct iommu_ops *ops, const struct bus_type *bus,
include/linux/iommu.h +0 -2
@@ -898,7 +898,6 @@ int iommu_device_sysfs_add(struct iommu_device *iommu,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); -int iommu_deferred_attach (struct device *dev,struct iommu_domain *domain);static inline struct iommu_device *dev_to_iommu_device (struct device *dev) {
@@ -943,7 +942,6 @@ extern void iommu_detach_device(struct iommu_domain *domain, struct device *dev);extern struct iommu_domain *iommu_get_domain_for_dev (struct device *dev);struct iommu_domain *iommu_driver_get_domain_for_dev (struct device *dev); -extern struct iommu_domain *iommu_get_dma_domain (struct device *dev);extern int iommu_map (struct iommu_domain *domain,unsigned long iova,phys_addr_t paddr,size_t size,int prot,gfp_t gfp); int iommu_map_nosync(struct iommu_domain *domain, unsigned long iova,
Signature · 1 line
2.54.0.dirty
Quoted 11 lines · Robin Murphy
Most of iommu-dma's own internals were privatised a while ago, but there are still a couple of DMA-domain-specific helpers provided by the core code. These now definitely have no reason to be exposed publicly, so move their declarations into the private header.
Signed-off-by Robin Murphy <[email protected]>--- drivers/iommu/dma-iommu.c | 1 + drivers/iommu/iommu-priv.h | 4 ++++ include/linux/iommu.h | 2 -- 3 files changed, 5 insertions(+), 2 deletions(-)
Reviewed-by Jason Gunthorpe <[email protected]>
Jason
Quoted 4 lines · Robin Murphy
drivers/iommu/dma-iommu.c | 1 + drivers/iommu/iommu-priv.h | 4 ++++ include/linux/iommu.h | 2 -- 3 files changed, 5 insertions(+), 2 deletions(-)
Applied, thanks.