]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd/iova_bitmap: Cache mapped length in iova_bitmap_map struct
authorJoao Martins <joao.m.martins@oracle.com>
Thu, 27 Jun 2024 11:01:01 +0000 (12:01 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 28 Jun 2024 16:12:23 +0000 (13:12 -0300)
commita84c690e10ae03f1cddec908ac7f5068ceed67a8
tree59f5d2c0f0d1b137c1b6bd1b5052574d52b1dc60
parent792583656f554e35383d6b2325371c8fe056a56b
iommufd/iova_bitmap: Cache mapped length in iova_bitmap_map struct

The amount of IOVA mapped will be used more often in iova_bitmap_set() in
preparation to dynamically iterate the bitmap. Cache said length to avoid
having to calculate it all the time.

Link: https://lore.kernel.org/r/20240627110105.62325-8-joao.m.martins@oracle.com
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Matt Ochs <mochs@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iova_bitmap.c