linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Frank Li <Frank.li@nxp.com>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	robin.murphy@arm.com, "Bjorn Helgaas" <bhelgaas@google.com>,
	"Richard Zhu" <hongxing.zhu@nxp.com>,
	"Lucas Stach" <l.stach@pengutronix.de>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
	alyssa@rosenzweig.io, bpf@vger.kernel.org, broonie@kernel.org,
	jgg@ziepe.ca, joro@8bytes.org, lgirdwood@gmail.com,
	maz@kernel.org, p.zabel@pengutronix.de, will@kernel.org
Subject: Re: [PATCH v8 2/2] PCI: imx6: Add IOMMU and ITS MSI support for i.MX95
Date: Mon, 13 Jan 2025 16:59:05 -0600	[thread overview]
Message-ID: <20250113225905.GA3325507-robh@kernel.org> (raw)
In-Reply-To: <Z31eaxD1h3Om3bHS@lizhi-Precision-Tower-5810>

On Tue, Jan 07, 2025 at 12:03:39PM -0500, Frank Li wrote:
> On Fri, Dec 27, 2024 at 10:58:15AM +0100, Lorenzo Pieralisi wrote:
> > On Tue, Dec 17, 2024 at 10:50:22AM -0500, Frank Li wrote:
> >
> > [...]
> >
> > > > > > Right. Question: what happens if DT shows that there are SMMU and/or
> > > > > > ITS bindings/mappings but the SMMU driver and ITS driver are either not
> > > > > > enabled or have not probed ?
> > > > >
> > > > > It is little bit complex.
> > > > > iommu:
> > > > > Case 1:
> > > > > 	iommu{
> > > > > 		status = "disabled"
> > > > > 	};
> > > > >
> > > > > 	PCI driver normal probed. if RID is in range of iommu-map, not
> > > > > any functional impact and harmless.
> > > > > 	If RID is out of range of iommu-map, "false alarm" will return.
> > > > > enable PCI EP device failure, but actually it can work without IOMMU.
> > > >
> > > > What does "false alarm" mean in practice ? PCI device enable fails
> > > > but actually it should not ?
> > >
> > > Yes, you are right. It should work without iommu. but return failure for
> > > this case.
> >
> > Rob, Robin, are you OK with this patch DT bindings usage (and the
> > related dependencies described in Frank's reply) ?
> >
> > I am referring to "iommu-map" and "msi-map" usage, everything else
> > is platform specific code.
> >
> > It looks like things can break in multiple ways but I don't want
> > to hold up this series forever.
> 
> Rob and Robin:
> 
> 	Let me simple summary situation. PCIe controler driver need config
> "stream id" for each PCI endpoint devices for IOMMU and MSI.
> 
> 	So add callback for host bridge enable/disable an endpoint devices.
> In callback function, call of_map_id("iommu-map" | "msi-map") to get
> devices's "stream id" from pci's rid.  Then config hardware.
> 
> 	The limiation is, if smmu/its controller's "status" is disabled
> and rid is out of the range of "iommu-map" and "msi-map". Enable device
> will be fail although it should be success because "stream id" will not be
> used at all at this case. The out of range of "iommu-map" and "msi-map" is
> rare.
> 
> 	dwc common pci driver simple check "msi-map", which should be
> another limition and not related this patch.
> 
> 	In many dwc platform (like qcom) need config "stream id" also. But
> that direct parse "iommu-map" and "msi-map" by their drivers, which is not
> prefered by Rob now when I try to upstream at v3
> https://lore.kernel.org/imx/20240429150842.GC1709920-robh@kernel.org/
> 
> 	Rob: can you help check if this is correct direction?

My objection was only parsing the property yourself rather than using 
existing functions. So it looks fine to me now. Though you might 
consider if there is something to be shared with QCom driver.

Rob


      reply	other threads:[~2025-01-13 23:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 22:48 [PATCH v8 0/2] PCI: add enabe(disable)_device() hook for bridge Frank Li
2024-12-10 22:48 ` [PATCH v8 1/2] PCI: Add enable_device() and disable_device() callbacks for bridges Frank Li
2024-12-10 22:48 ` [PATCH v8 2/2] PCI: imx6: Add IOMMU and ITS MSI support for i.MX95 Frank Li
2024-12-12 16:46   ` Lorenzo Pieralisi
2024-12-12 17:29     ` Frank Li
2024-12-13  9:32       ` Lorenzo Pieralisi
2024-12-13 17:20         ` Frank Li
2024-12-17  9:25           ` Lorenzo Pieralisi
2024-12-17 15:50             ` Frank Li
2024-12-27  9:58               ` Lorenzo Pieralisi
2025-01-07 17:03                 ` Frank Li
2025-01-13 22:59                   ` Rob Herring [this message]

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=20250113225905.GA3325507-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Frank.li@nxp.com \
    --cc=alyssa@rosenzweig.io \
    --cc=bhelgaas@google.com \
    --cc=bpf@vger.kernel.org \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kernel@pengutronix.de \
    --cc=kw@linux.com \
    --cc=l.stach@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=maz@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robin.murphy@arm.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).