On Thu, 2020-01-09 at 17:11 -0600, Bjorn Helgaas wrote:
> In subject:
> s/Introduce direct dma alias/Add pci_direct_dma_alias()/
> 
> On Thu, Jan 09, 2020 at 07:30:54AM -0700, Jon Derrick wrote:
> > The current dma alias implementation requires the aliased device be on
> > the same bus as the dma parent. This introduces an arch-specific
> > mechanism to point to an arbitrary struct device when doing mapping and
> > pci alias search.
> 
> "arbitrary struct device" is a little weird since an arbitrary device
> doesn't have to be a PCI device, but these mappings and aliases only
> make sense in the PCI domain.
> 
> Maybe it has something to do with pci_sysdata.vmd_dev being a
> "struct device *" rather than a "struct pci_dev *"?  I don't know why
> that is, because it looks like every place you use it, you use
> to_pci_dev() to get the pci_dev pointer back anyway.  But I assume you
> have some good reason for that.
No particular reason other than to align with the suggestion in the
last set to be using the struct device. It does make sense to reference
the struct device as that provides the dma context, however as you have
pointed out, the implementation here moreso needs the device's
pci_dev. 

I'll see how it looks for the next set.

> 
> s/dma/DMA/
> s/pci/PCI/
> (above and also in code comments below)
> 
> > 
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to