[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <113B93C0-8384-431A-BE4D-AA98B67C342A@kernel.org>
Date: Sun, 24 Nov 2024 10:56:38 +0100
From: Niklas Cassel <cassel@...nel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Frank Li <Frank.Li@....com>
CC: Krzysztof WilczyĆski <kw@...ux.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org, imx@...ts.linux.dev,
dlemoal@...nel.org, maz@...nel.org, tglx@...utronix.de, jdmason@...zu.us
Subject: Re: [PATCH v8 2/6] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller
On 24 November 2024 08:11:00 CET, Manivannan Sadhasivam <manivannan.sadhasivam@...aro.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?
*/
if (ret) {
dev_err(dev, "Failed to allocate MSI\n");
return -ENODEV;
}
Kind regards,
Niklas
Powered by blists - more mailing lists