From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "helgaas@kernel.org" <helgaas@kernel.org>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH v2 3/5] PCI: Introduce direct dma alias
Date: Thu, 9 Jan 2020 23:37:24 +0000 [thread overview]
Message-ID: <f0e837bca2bd141e529dbd5817b52d77cea87ddd.camel@intel.com> (raw)
In-Reply-To: <20200109231141.GA41540@google.com>
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
next prev parent reply other threads:[~2020-01-09 23:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 14:30 [PATCH v2 0/5] Clean up VMD DMA Map Ops Jon Derrick
2020-01-09 14:30 ` [PATCH v2 1/5] x86/pci: Add a to_pci_sysdata helper Jon Derrick
2020-01-09 14:30 ` [PATCH v2 2/5] x86/pci: Replace the vmd_domain field with a vmd_dev pointer Jon Derrick
2020-01-09 14:30 ` [PATCH v2 3/5] PCI: Introduce direct dma alias Jon Derrick
2020-01-09 23:11 ` Bjorn Helgaas
2020-01-09 23:37 ` Derrick, Jonathan [this message]
2020-01-09 14:30 ` [PATCH v2 4/5] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2020-01-09 14:30 ` [PATCH v2 5/5] x86/pci: Remove X86_DEV_DMA_OPS Jon Derrick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0e837bca2bd141e529dbd5817b52d77cea87ddd.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=dwmw2@infradead.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=kbusch@kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox