From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Frank Li <Frank.li@nxp.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Richard Zhu" <hongxing.zhu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.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, robin.murphy@arm.com,
will@kernel.org
Subject: Re: [PATCH v3 2/2] PCI: imx6: Add IOMMU and ITS MSI support for i.MX95
Date: Sun, 3 Nov 2024 11:53:05 +0530 [thread overview]
Message-ID: <20241103062305.6cqftpv4bwneg2mo@thinkpad> (raw)
In-Reply-To: <ZyZg1nlSPf5rvm8q@lizhi-Precision-Tower-5810>
On Sat, Nov 02, 2024 at 01:26:46PM -0400, Frank Li wrote:
[...]
> > > +
> > > + target = NULL;
> > > + err_i = of_map_id(dev->of_node, rid, "iommu-map", "iommu-map-mask", &target, &sid_i);
> > > + target = NULL;
> >
> > What is the point in passing 'target' here?
>
> See https://lore.kernel.org/imx/b479cad6-e0c5-48fb-bb8f-a70f7582cfd5@arm.com/
> Marc Zyngier's comments:
>
> "Perhaps it is reasonable to assume that i.MX95 will never have SMMU/ITS
> mappings for low-numbered devices on bus 0, but in general this isn't
> very robust, and either way it's certainly not all that clear at first
> glance what assmuption is actually being made here. If it's significant
> whether a mapping actually exists or not for the given ID then you
> should really use the "target" argument of of_map_id() to determine that."
>
> See v4 https://lore.kernel.org/imx/20241101-imx95_lut-v4-2-0fdf9a2fe754@nxp.com/
>
Okay, thanks! I was confused by the fact that you never used 'target' in this
version. But v4 clears it up.
- Mani
> + target = NULL;
> + err_m = of_map_id(dev->of_node, rid, "msi-map", "msi-map-mask", &target, &sid_m);
> +
> + /*
> + * Return failure if msi-map exist and no entry for rid because dwc common
> + * driver will skip setting up built-in MSI controller if msi-map existed.
> + *
> + * err_m target
> + * 0 NULL Return failure, function not work.
> + * !0 NULL msi-map not exist, use built-in MSI.
> + * 0 !NULL Find one entry.
> + * !0 !NULL Invalidate case.
> + */
>
>
> >
> > > + err_m = of_map_id(dev->of_node, rid, "msi-map", "msi-map-mask", &target, &sid_m);
> > > +
> > > +
> > > + /*
> > > + * msi-map iommu-map
> > > + * Y Y ITS + SMMU, require the same sid
> > > + * Y N ITS
> > > + * N Y DWC MSI Ctrl + SMMU
> > > + * N N DWC MSI Ctrl
> > > + */
> > > + if (!err_i && !err_m)
> > > + if ((sid_i & IMX95_SID_MASK) != (sid_m & IMX95_SID_MASK)) {
> > > + dev_err(dev, "its and iommu stream id miss match, please check dts file\n");
> >
> > "iommu-map and msi-map entries mismatch!"
> >
> > - Mani
> >
> > --
> > மணிவண்ணன் சதாசிவம்
--
மணிவண்ணன் சதாசிவம்
prev parent reply other threads:[~2024-11-03 6:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 22:34 [PATCH v3 0/2] PCI: add enabe(disable)_device() hook for bridge Frank Li
2024-10-24 22:34 ` [PATCH v3 1/2] PCI: Add enable_device() and disable_device() callbacks for bridges Frank Li
2024-10-30 21:00 ` Bjorn Helgaas
2024-11-01 16:58 ` Marc Zyngier
2024-11-02 11:10 ` Manivannan Sadhasivam
2024-11-02 11:32 ` Marc Zyngier
2024-11-02 11:54 ` Manivannan Sadhasivam
2024-11-02 12:24 ` Marc Zyngier
2024-11-02 12:48 ` Manivannan Sadhasivam
2024-10-24 22:34 ` [PATCH v3 2/2] PCI: imx6: Add IOMMU and ITS MSI support for i.MX95 Frank Li
2024-11-01 17:23 ` Robin Murphy
2024-11-02 11:49 ` Manivannan Sadhasivam
2024-11-02 17:26 ` Frank Li
2024-11-02 22:18 ` Marc Zyngier
2024-11-03 6:23 ` Manivannan Sadhasivam [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=20241103062305.6cqftpv4bwneg2mo@thinkpad \
--to=manivannan.sadhasivam@linaro.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=maz@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--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