Robin Murphy
2021-Mar-12 16:18 UTC
[PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE
On 2021-03-11 08:26, Christoph Hellwig wrote:> On Wed, Mar 10, 2021 at 06:39:57PM +0000, Robin Murphy wrote: >>> Actually... Just mirroring the iommu_dma_strict value into >>> struct iommu_domain should solve all of that with very little >>> boilerplate code. >> >> Yes, my initial thought was to directly replace the attribute with a >> common flag at iommu_domain level, but since in all cases the behaviour >> is effectively global rather than actually per-domain, it seemed >> reasonable to take it a step further. This passes compile-testing for >> arm64 and x86, what do you think? > > It seems to miss a few bits, and also generally seems to be not actually > apply to recent mainline or something like it due to different empty > lines in a few places.Yeah, that was sketched out on top of some other development patches, and in being so focused on not breaking any of the x86 behaviours I did indeed overlook fully converting the SMMU drivers... oops! (my thought was to do the conversion for its own sake, then clean up the redundant attribute separately, but I guess it's fine either way)> Let me know what you think of the version here: > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/iommu-cleanup > > I'll happily switch the patch to you as the author if you're fine with > that as well.I still have reservations about removing the attribute API entirely and pretending that io_pgtable_cfg is anything other than a SoC-specific private interface, but the reworked patch on its own looks reasonable to me, thanks! (I wasn't too convinced about the iommu_cmd_line wrappers either...) Just iommu_get_dma_strict() needs an export since the SMMU drivers can be modular - I consciously didn't add that myself since I was mistakenly thinking only iommu-dma would call it. Robin.
Christoph Hellwig
2021-Mar-15 08:33 UTC
[PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE
On Fri, Mar 12, 2021 at 04:18:24PM +0000, Robin Murphy wrote:>> Let me know what you think of the version here: >> >> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/iommu-cleanup >> >> I'll happily switch the patch to you as the author if you're fine with >> that as well. > > I still have reservations about removing the attribute API entirely and > pretending that io_pgtable_cfg is anything other than a SoC-specific > private interface,I think a private inteface would make more sense. For now I've just condensed it down to a generic set of quirk bits and dropped the attrs structure, which seems like an ok middle ground for now. That being said I wonder why that quirk isn't simply set in the device tree?> but the reworked patch on its own looks reasonable to > me, thanks! (I wasn't too convinced about the iommu_cmd_line wrappers > either...) Just iommu_get_dma_strict() needs an export since the SMMU > drivers can be modular - I consciously didn't add that myself since I was > mistakenly thinking only iommu-dma would call it.Fixed. Can I get your signoff for the patch? Then I'll switch it to over to being attributed to you.