Linux PCI subsystem development
 help / color / mirror / Atom feed
From: dann frazier <dann.frazier@canonical.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>,
	joro@8bytes.org, will@kernel.org,
	iommu@lists.linux-foundation.org, bhelgaas@google.com,
	linux-pci@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH] iommu/dma: Explicitly sort PCI DMA windows
Date: Wed, 23 Mar 2022 16:15:03 -0600	[thread overview]
Message-ID: <Yjub51Ct3esuNA9B@xps13.dannf> (raw)
In-Reply-To: <874k3pxalr.wl-maz@kernel.org>

On Wed, Mar 23, 2022 at 09:49:04AM +0000, Marc Zyngier wrote:
> On Tue, 22 Mar 2022 17:27:36 +0000,
> Robin Murphy <robin.murphy@arm.com> wrote:
> > 
> > Originally, creating the dma_ranges resource list in pre-sorted fashion
> > was the simplest and most efficient way to enforce the order required by
> > iova_reserve_pci_windows(). However since then at least one PCI host
> > driver is now re-sorting the list for its own probe-time processing,
> > which doesn't seem entirely unreasonable, so that basic assumption no
> > longer holds. Make iommu-dma robust and get the sort order it needs by
> > explicitly sorting, which means we can also save the effort at creation
> > time and just build the list in whatever natural order the DT had.
> > 
> > Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> > ---
> > 
> > Looking at this area off the back of the XGene thread[1] made me realise
> > that we need to do it anyway, regardless of whether it might also happen
> > to restore the previous XGene behaviour or not. Presumably nobody's
> > tried to use pcie-cadence-host behind an IOMMU yet...
> 
> This definitely restores PCIe functionality on my Mustang (XGene-1).
> Hopefully dann can comment on whether this addresses his own issue, as
> his firmware is significantly different.

Robin, Marc,

Adding just this patch on top of v5.17 (w/ vendor dtb) isn't enough to
fix m400 networking:

  https://paste.ubuntu.com/p/H5ZNbRvP8V/

  -dann

  reply	other threads:[~2022-03-23 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 17:27 [PATCH] iommu/dma: Explicitly sort PCI DMA windows Robin Murphy
2022-03-23  9:49 ` Marc Zyngier
2022-03-23 22:15   ` dann frazier [this message]
2022-03-24  0:55     ` Rob Herring
2022-03-24  3:09       ` dann frazier
2022-03-24  0:56 ` Rob Herring
2022-03-24 10:08   ` Robin Murphy

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=Yjub51Ct3esuNA9B@xps13.dannf \
    --to=dann.frazier@canonical.com \
    --cc=bhelgaas@google.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@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