On Mon, Nov 04, 2024 at 04:09:51PM -0400, Jason Gunthorpe wrote: > Runs OK now: > > arm-v7s io-pgtable: self test ok > arm-lpae io-pgtable: selftest: pgsize_bitmap 0x40201000, IAS 32 > > Jason > > --- a/drivers/iommu/io-pgtable-arm-v7s.c > +++ b/drivers/iommu/io-pgtable-arm-v7s.c > @@ -819,7 +819,7 @@ static int __init arm_v7s_do_selftests(void) > .quirks = IO_PGTABLE_QUIRK_ARM_NS, > .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M, > }; > - unsigned int iova, size, iova_start; > + unsigned int iova, size; > unsigned int i, loopnr = 0; > size_t mapped; > > @@ -871,25 +871,6 @@ static int __init arm_v7s_do_selftests(void) > loopnr++; > } > > - /* Partial unmap */ > - i = 1; > - size = 1UL << __ffs(cfg.pgsize_bitmap); > - while (i < loopnr) { > - iova_start = i * SZ_16M; > - if (ops->unmap_pages(ops, iova_start + size, size, 1, NULL) != size) > - return __FAIL(ops); > - > - /* Remap of partial unmap */ > - if (ops->map_pages(ops, iova_start + size, size, size, 1, > - IOMMU_READ, GFP_KERNEL, &mapped)) > - return __FAIL(ops); > - > - if (ops->iova_to_phys(ops, iova_start + size + 42) > - != (size + 42)) > - return __FAIL(ops); > - i++; > - } > - > /* Full unmap */ > iova = 0; > for_each_set_bit(i, &cfg.pgsize_bitmap, BITS_PER_LONG) { Yup, and you can do the same for the other selftest in io-pgtable-arm.c Will