From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Niklas Cassel <cassel@kernel.org>
Cc: "Frank Li" <Frank.Li@nxp.com>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
imx@lists.linux.dev, dlemoal@kernel.org, maz@kernel.org,
tglx@linutronix.de, jdmason@kudzu.us
Subject: Re: [PATCH v8 2/6] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller
Date: Sun, 24 Nov 2024 18:47:01 +0530 [thread overview]
Message-ID: <20241124131701.yrb4bkhwigcux6b4@thinkpad> (raw)
In-Reply-To: <113B93C0-8384-431A-BE4D-AA98B67C342A@kernel.org>
On Sun, Nov 24, 2024 at 10:56:38AM +0100, Niklas Cassel wrote:
>
>
> On 24 November 2024 08:11:00 CET, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> wrote:
> >On Sat, Nov 16, 2024 at 09:40:42AM -0500, Frank Li wrote:
> >> +static int pci_epc_alloc_doorbell(struct pci_epc *epc, struct pci_epf *epf)
> >> +{
> >> + struct device *dev = epc->dev.parent;
> >> + u16 num_db = epf->num_db;
> >> + int i = 0;
> >> + int ret;
> >> +
> >> + guard(mutex)(&epc->lock);
> >> +
> >> + ret = platform_device_msi_init_and_alloc_irqs(dev, num_db, pci_epc_write_msi_msg);
> >> + if (ret) {
> >> + dev_err(dev, "Failed to allocate MSI, may miss 'msi-parent' at your DTS\n");
> >
> >No need to mention 'msi-parent'. Just 'Failed to allocate MSI' is enough.
>
> If you look at the existing pcie_ep device tree nodes for all SoCs, you will see that it is very rare to see an EP node which specifies msi-parent.
>
> I guess that makes sense, since before this series, AFAICT, msi-parent was completely unused, so there was no need for an EP node to specify it.
>
> I'm okay to change the error print as you suggested, but in that case I really think that we should add a comment above the check, something suggestive like:
>
> /*
> * The pcie_ep DT node has to specify
> * 'msi-parent' for EP doorbell support to work.
> * Right now only GIC ITS is supported.
> * If you have GIC ITS and reached this print,
> * perhaps you are missing 'msi-parent' in DT?
> */
Looks good to me (except that the comment needs to fit 80 columns) :)
- Mani
> if (ret) {
> dev_err(dev, "Failed to allocate MSI\n");
> return -ENODEV;
> }
>
>
> Kind regards,
> Niklas
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-11-24 13:17 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 14:40 [PATCH v8 0/6] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Frank Li
2024-11-16 14:40 ` [PATCH v8 1/6] PCI: endpoint: Add pci_epc_get_fn() API for customizable filtering Frank Li
2024-11-16 14:40 ` [PATCH v8 2/6] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller Frank Li
2024-11-24 7:11 ` Manivannan Sadhasivam
2024-11-24 9:56 ` Niklas Cassel
2024-11-24 13:17 ` Manivannan Sadhasivam [this message]
2024-11-24 15:26 ` Niklas Cassel
2024-11-25 18:03 ` Frank Li
2024-11-26 4:14 ` Manivannan Sadhasivam
2024-11-26 17:19 ` Frank Li
2024-11-27 6:20 ` Manivannan Sadhasivam
2024-11-16 14:40 ` [PATCH v8 3/6] PCI: endpoint: Add pci_epf_align_addr() helper for address alignment Frank Li
2024-11-24 7:32 ` Manivannan Sadhasivam
2024-11-25 19:22 ` Frank Li
2024-11-26 4:19 ` Manivannan Sadhasivam
2024-11-26 9:36 ` Niklas Cassel
2024-11-26 10:27 ` Niklas Cassel
2024-11-16 14:40 ` [PATCH v8 4/6] PCI: endpoint: pci-epf-test: Add doorbell test support Frank Li
2024-11-24 7:56 ` Manivannan Sadhasivam
2024-11-25 19:17 ` Frank Li
2024-11-26 4:25 ` Manivannan Sadhasivam
2024-11-26 10:00 ` Niklas Cassel
2024-11-26 12:41 ` Manivannan Sadhasivam
2024-11-26 16:55 ` Frank Li
2024-11-27 8:53 ` Niklas Cassel
2024-11-26 16:46 ` Frank Li
2024-11-16 14:40 ` [PATCH v8 5/6] misc: pci_endpoint_test: Add doorbell test case Frank Li
2024-11-24 13:51 ` Manivannan Sadhasivam
2024-11-25 19:12 ` Frank Li
2024-11-16 14:40 ` [PATCH v8 6/6] tools: PCI: Add 'B' option for test doorbell 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=20241124131701.yrb4bkhwigcux6b4@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=Frank.Li@nxp.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=maz@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