RFC Introduce automatic DMA configuration for IOMMU masters
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 7 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 7 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/7] Introduce automatic DMA configuration for IOMMU masters
Hi Will,
Quoted 33 lines · Will Deacon
Quoted 27 lines · Marek Szyprowski
Quoted 18 lines · Will Deacon
This patch series is an RFC to implement IOMMU master configuration into
of_dma_configure. I haven't yet ported any IOMMU drivers to it, so it remains untested, but I wanted to get some early feedback to ensure that this doesn't end up going in the wrong direction.The idea comes out of my understanding following discussions with Arnd and David at Kernel Summit / LinuxCon in Chicago. Essentially:
- Allow IOMMUs to be probed early and set up per-instance data on their
of_node- Add a new callback to the
iommu_opsstructure for adding a device with a set of opaque IDs (e.g. Stream IDs or Requester IDs)- Add an
of_iommu_configurefunction, called fromof_dma_configure, which registers the master IDs with the correspond IOMMU before probing the master itselfQuoted 8 lines
- Where applicable, create an IOMMU domain per device and swizzle the DMA ops for that device to use the IOMMU variants.
I haven't bothered doing anything clever with the DMA masks yet, so I wouldn't be surprised if we end up chewing through tonnes of memory allocating IOMMU domains that are far too big at the moment. Again, this is just an RFC and I'd welcome comments on the general direction of the series.
Quoted 5 lines
Thanks for your patches, I wasn't aware the fact that you are working on this. When do you plan to send a second version? I would like to rebase my Exynos IOMMU patches (https://lkml.org/lkml/2014/8/5/183) on top of your work, but I wonder if I should select this version as a base or wait a bit for an update.
Quoted 4 lines
I'll try and get something out today/tomorrow depending on how easily the review comments fall out. It would be really great if you get an IOMMU working with this (I was going to look at the ARM SMMU once this stops moving)
Great, I will wait then for v2.
Quoted 2 lines
-- I have concerns that allocating one domain per master might be
too much, but it's hard to tell without an IOMMU driver ported over.
One domain per master is IMHO a sane default configuration. The only default alternative I see is to have only one domain (related with dma-mapping subsystem) and bind all devices to it. However I really don't see any disadvantage of having separate domain per each master and such configuration
gives devices better separation.
However we also need to figure out how to let drivers to make their own configuration, like it is required by Exynos DRM subsystem, which consist of several devices, each having its own IOMMU controller, but for convenience those drivers assume that they all have been bound to the same, single domain.
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland