From: Marc Zyngier <maz@kernel.org>
To: Frank Li <frank.li@nxp.com>
Cc: "jdmason@kudzu.us" <jdmason@kudzu.us>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"kw@linux.com" <kw@linux.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Peng Fan <peng.fan@nxp.com>, Aisheng Dong <aisheng.dong@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
dl-linux-imx <linux-imx@nxp.com>, "kishon@ti.com" <kishon@ti.com>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"ntb@lists.linux.dev" <ntb@lists.linux.dev>
Subject: Re: [EXT] Re: [PATCH v3 2/4] irqchip: imx mu worked as msi controller
Date: Fri, 22 Jul 2022 08:33:17 +0100 [thread overview]
Message-ID: <87tu79y536.wl-maz@kernel.org> (raw)
In-Reply-To: <PAXPR04MB9186A1D283ACE8BD6954039288919@PAXPR04MB9186.eurprd04.prod.outlook.com>
On Thu, 21 Jul 2022 16:22:08 +0100,
Frank Li <frank.li@nxp.com> wrote:
>
> > > + pos = find_first_zero_bit(&msi_data->used, IMX_MU_CHANS);
> > > + if (pos < IMX_MU_CHANS)
> > > + __set_bit(pos, &msi_data->used);
> > > + else
> > > + err = -ENOSPC;
> > > + spin_unlock(&msi_data->lock);
> > > +
> > > + if (err)
> > > + return err;
> > > +
> > > + err = iommu_dma_prepare_msi(info->desc, msi_data->msiir_addr +
> > pos * 4);
> >
> > Does this HW even have an IOMMU?
>
> [Frank Li] we have a platform with iommu.
I really wonder whether you are taking me for a ride, or whether you
are completely misunderstanding what this IOMMU business is about.
This is a *CPU* writing to the device to generate an MSI. CPU
transactions cannot be translated by an IOMMU as they are not
(surprise!) IO devices. They are in control of their own translation,
contrary to devices that generate MSIs.
So what sort of translation do you expect this to setup? What StreamID
is getting used by the DMA framework? There is no answer to these
questions because they don't make any sense. None of it makes any
sense.
At best, you are simply copy-pasting things from various drivers
without understanding what they are all about. I suggest you stop
doing that and make use of your time working out the problem rather
than wasting the reviewers'.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-07-22 7:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 21:30 [PATCH v3 0/4] PCI EP driver support MSI doorbell from host Frank Li
2022-07-20 21:30 ` [PATCH v3 1/4] irqchip: allow pass down .pm field at IRQCHIP_PLATFORM_DRIVER_END Frank Li
2022-07-20 21:30 ` [PATCH v3 2/4] irqchip: imx mu worked as msi controller Frank Li
2022-07-21 7:57 ` Marc Zyngier
2022-07-21 15:22 ` [EXT] " Frank Li
2022-07-21 15:28 ` Marc Zyngier
2022-07-21 15:35 ` Frank Li
2022-07-26 21:48 ` Frank Li
2022-07-27 8:02 ` Marc Zyngier
2022-07-27 15:23 ` Frank Li
2022-07-27 15:34 ` Marc Zyngier
2022-07-27 18:29 ` Frank Li
2022-07-27 18:58 ` Frank Li
2022-07-22 7:33 ` Marc Zyngier [this message]
2022-07-22 16:12 ` Frank Li
2022-07-20 21:30 ` [PATCH v3 3/4] dt-bindings: irqchip: imx mu work " Frank Li
2022-07-23 18:50 ` Krzysztof Kozlowski
2022-07-25 16:29 ` [EXT] " Frank Li
2022-07-25 16:44 ` Krzysztof Kozlowski
2022-07-25 16:55 ` Frank Li
2022-07-25 20:28 ` Krzysztof Kozlowski
2022-08-10 14:01 ` Rob Herring
2022-08-10 14:20 ` Marc Zyngier
2022-08-10 14:32 ` Jon Mason
2022-07-20 21:30 ` [PATCH v3 4/4] pcie: endpoint: pci-epf-vntb: add endpoint MSI support Frank Li
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=87tu79y536.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=aisheng.dong@nxp.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=frank.li@nxp.com \
--cc=jdmason@kudzu.us \
--cc=kernel@pengutronix.de \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=ntb@lists.linux.dev \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=tglx@linutronix.de \
/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).