Commit 13578d4e authored by Joao Martins's avatar Joao Martins Committed by Jason Gunthorpe

iommufd/iova_bitmap: Move symbols to IOMMUFD namespace

Have the IOVA bitmap exported symbols adhere to the IOMMUFD symbol
export convention i.e. using the IOMMUFD namespace. In doing so,
import the namespace in the current users. This means VFIO and the
vfio-pci drivers that use iova_bitmap_set().

Link: https://lore.kernel.org/r/20231024135109.73787-4-joao.m.martins@oracle.comSuggested-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarJoao Martins <joao.m.martins@oracle.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Reviewed-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 8c9c727b
...@@ -268,7 +268,7 @@ struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length, ...@@ -268,7 +268,7 @@ struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length,
iova_bitmap_free(bitmap); iova_bitmap_free(bitmap);
return ERR_PTR(rc); return ERR_PTR(rc);
} }
EXPORT_SYMBOL_GPL(iova_bitmap_alloc); EXPORT_SYMBOL_NS_GPL(iova_bitmap_alloc, IOMMUFD);
/** /**
* iova_bitmap_free() - Frees an IOVA bitmap object * iova_bitmap_free() - Frees an IOVA bitmap object
...@@ -290,7 +290,7 @@ void iova_bitmap_free(struct iova_bitmap *bitmap) ...@@ -290,7 +290,7 @@ void iova_bitmap_free(struct iova_bitmap *bitmap)
kfree(bitmap); kfree(bitmap);
} }
EXPORT_SYMBOL_GPL(iova_bitmap_free); EXPORT_SYMBOL_NS_GPL(iova_bitmap_free, IOMMUFD);
/* /*
* Returns the remaining bitmap indexes from mapped_total_index to process for * Returns the remaining bitmap indexes from mapped_total_index to process for
...@@ -389,7 +389,7 @@ int iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque, ...@@ -389,7 +389,7 @@ int iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(iova_bitmap_for_each); EXPORT_SYMBOL_NS_GPL(iova_bitmap_for_each, IOMMUFD);
/** /**
* iova_bitmap_set() - Records an IOVA range in bitmap * iova_bitmap_set() - Records an IOVA range in bitmap
...@@ -423,4 +423,4 @@ void iova_bitmap_set(struct iova_bitmap *bitmap, ...@@ -423,4 +423,4 @@ void iova_bitmap_set(struct iova_bitmap *bitmap,
cur_bit += nbits; cur_bit += nbits;
} while (cur_bit <= last_bit); } while (cur_bit <= last_bit);
} }
EXPORT_SYMBOL_GPL(iova_bitmap_set); EXPORT_SYMBOL_NS_GPL(iova_bitmap_set, IOMMUFD);
...@@ -1376,6 +1376,7 @@ static struct pci_driver mlx5vf_pci_driver = { ...@@ -1376,6 +1376,7 @@ static struct pci_driver mlx5vf_pci_driver = {
module_pci_driver(mlx5vf_pci_driver); module_pci_driver(mlx5vf_pci_driver);
MODULE_IMPORT_NS(IOMMUFD);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Max Gurtovoy <mgurtovoy@nvidia.com>"); MODULE_AUTHOR("Max Gurtovoy <mgurtovoy@nvidia.com>");
MODULE_AUTHOR("Yishai Hadas <yishaih@nvidia.com>"); MODULE_AUTHOR("Yishai Hadas <yishaih@nvidia.com>");
......
...@@ -204,6 +204,7 @@ static struct pci_driver pds_vfio_pci_driver = { ...@@ -204,6 +204,7 @@ static struct pci_driver pds_vfio_pci_driver = {
module_pci_driver(pds_vfio_pci_driver); module_pci_driver(pds_vfio_pci_driver);
MODULE_IMPORT_NS(IOMMUFD);
MODULE_DESCRIPTION(PDS_VFIO_DRV_DESCRIPTION); MODULE_DESCRIPTION(PDS_VFIO_DRV_DESCRIPTION);
MODULE_AUTHOR("Brett Creeley <brett.creeley@amd.com>"); MODULE_AUTHOR("Brett Creeley <brett.creeley@amd.com>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -1693,6 +1693,7 @@ static void __exit vfio_cleanup(void) ...@@ -1693,6 +1693,7 @@ static void __exit vfio_cleanup(void)
module_init(vfio_init); module_init(vfio_init);
module_exit(vfio_cleanup); module_exit(vfio_cleanup);
MODULE_IMPORT_NS(IOMMUFD);
MODULE_VERSION(DRIVER_VERSION); MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_AUTHOR(DRIVER_AUTHOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment