iommu/pages: De-inline the substantial functions
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 8 Apr 2025 16:53:55 +0000 (13:53 -0300)
committerJoerg Roedel <jroedel@suse.de>
Thu, 17 Apr 2025 14:22:39 +0000 (16:22 +0200)
commitf5af4a4f7ccb58c0022175b3457c840a77463e7a
treecf44989853ee7f1aecd02955709e24e23a1d73ee
parent3e8e986ce8a0d5fcf5479212d0c1ece4626c4a27
iommu/pages: De-inline the substantial functions

These are called in a lot of places and are not trivial. Move them to the
core module.

Tidy some of the comments and function arguments, fold
__iommu_alloc_account() into its only caller, change
__iommu_free_account() into __iommu_free_page() to remove some
duplication.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/7-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/Makefile
drivers/iommu/iommu-pages.c [new file with mode: 0644]
drivers/iommu/iommu-pages.h