Hi Isaac, I had a go at removing the loop you have in pgsize_bitmap() over at:
https://lore.kernel.org/r/[email protected] and I ended up with this. It's _very_ lightly tested, but I thought it might be useful to you, especially if you're going to be adding support for '->map_pages' as well. Cheers, Will Cc: "Isaac J. Manjarres" <[email protected]> Cc: Pratik Patel <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Lu Baolu <[email protected]> --->8 Isaac J. Manjarres (2): iommu/io-pgtable: Introduce unmap_pages() as a page table op iommu: Add an unmap_pages() op for IOMMU drivers Will Deacon (4): iommu: Use bitmap to calculate page size in iommu_pgsize() iommu: Split 'addr_merge' argument to iommu_pgsize() into separate parts iommu: Hook up '->unmap_pages' driver callback iommu: Accomodate larger pages in iommu_pgsize() 'count' calculation drivers/iommu/iommu.c | 87 +++++++++++++++++++++++++++----------- include/linux/io-pgtable.h | 4 ++ include/linux/iommu.h | 4 ++ 3 files changed, 70 insertions(+), 25 deletions(-) -- 2.31.0.291.g576ba9dcdaf-goog _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
