On Sun, Feb 23, 2025 at 09:48:30AM +0100, Sasha Finkelstein wrote: > On Wed, 19 Feb 2025 at 12:34, Janne Grunau <j@xxxxxxxxxx> wrote: > > > + while (maps < end) { > > > + maps++; > > > + maps = of_translate_dma_region(dev->of_node, maps, &heap_base, > > > + &heap_size); > > > + } > > > > The hand-rolled reserved memory parsing looks like it can be replaced > > with of_iommu_get_resv_region(); > > I have looked into it, and `of_iommu_get_resv_region` does the wrong > thing. We fill out `reg`, and it grabs that instead of `iommu-addresses`. Downstream commit 704ace01cd3c4 [0] ("iommu: Add IOMMU_RESV_TRANSLATED for non 1:1 mapped reserved regions") adds device virtual addresses to struct iommu_resv_region. Sorry for the added dependency but it is required anyway for the isp to work. ciao Janne [0] https://github.com/AsahiLinux/linux/commit/704ace01cd3c423b1e2492f0777d9c4c0f3404d8