On Thu, Apr 07, 2022 at 02:53:38PM +0100, Robin Murphy wrote: > > Why can't this just go into generic_iommu_put_resv_regions? The idea > > that the iommu low-level drivers need to call into dma-iommu which is > > a consumer of the IOMMU API is odd. Especially if that just calls out > > to ACPI code and generic IOMMU code only anyway. > > Because assuming ACPI means IORT is not generic. Part of the aim in adding > the union to iommu_resv_region is that stuff like AMD's unity_map_entry and > Intel's dmar_rmrr_unit can be folded into it as well, and their reserved > region handling correspondingly simplified too. > > The iommu_dma_{get,put}_resv_region() helpers are kind of intended to be > specific to the fwnode mechanism which deals with IORT and devicetree (once > the reserved region bindings are fully worked out). But IORT is not driver₋specific code. So we'll need a USE_IORT flag somewhere in core IOMMU code instead of trying to stuff this into driver operations. and dma-iommu mostly certainly implies IORT even less than ACPI.