iommu: Update various drivers to pass in lg2sz instead of order to iommu pages
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 8 Apr 2025 16:54:07 +0000 (13:54 -0300)
committerJoerg Roedel <jroedel@suse.de>
Thu, 17 Apr 2025 14:22:48 +0000 (16:22 +0200)
commitd50aaa4a9ffb0149d2187dfe3477300561f06fec
tree07febac9b14321e5d71e45abb792698651a6e565
parent9dda3f01ddf056ec023c89e43354fa3caabd8fb9
iommu: Update various drivers to pass in lg2sz instead of order to iommu pages

Convert most of the places calling get_order() as an argument to the
iommu-pages allocator into order_base_2() or the _sz flavour
instead. These places already have an exact size, there is no particular
reason to use order here.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.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/19-v4-c8663abbb606+3f7-iommu_pages_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/init.c
drivers/iommu/intel/dmar.c
drivers/iommu/io-pgtable-arm.c
drivers/iommu/io-pgtable-dart.c
drivers/iommu/sun50i-iommu.c