From: Marc Zyngier <marc.zyngier@arm.com>
To: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
michals@xilinx.com, sorenb@xilinx.com, bhelgaas@google.com,
arnd@arndb.de, tinamdar@apm.com, treding@nvidia.com,
rjui@broadcom.com, Minghuan.Lian@freescale.com,
m-karicheri2@ti.com, hauke@hauke-m.de, dhdang@apm.com,
sbranden@broadcom.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Bharat Kumar Gogada <bharatku@xilinx.com>,
Ravi Kiran Gummaluri <rgummal@xilinx.com>
Subject: Re: [PATCH v8] PCI: Xilinx-NWL-PCIe: Added support for Xilinx NWL PCIe Host Controller
Date: Wed, 11 Nov 2015 17:37:12 +0000 [thread overview]
Message-ID: <20151111173712.7dde8a42@arm.com> (raw)
In-Reply-To: <1447223619-30945-1-git-send-email-bharatku@xilinx.com>
On Wed, 11 Nov 2015 12:03:39 +0530
Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> wrote:
> Adding PCIe Root Port driver for Xilinx PCIe NWL bridge IP.
>
> Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
> Signed-off-by: Ravi Kiran Gummaluri <rgummal@xilinx.com>
> ---
> Added logic to allocate contiguous hwirq in nwl_irq_domain_alloc function.
> Moved MSI functionality to separate functions.
> Changed error return values.
> ---
> .../devicetree/bindings/pci/xilinx-nwl-pcie.txt | 68 ++
> drivers/pci/host/Kconfig | 16 +-
> drivers/pci/host/Makefile | 1 +
> drivers/pci/host/pcie-xilinx-nwl.c | 1062 ++++++++++++++++++++
> 4 files changed, 1144 insertions(+), 3 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/pci/xilinx-nwl-pcie.txt
> create mode 100644 drivers/pci/host/pcie-xilinx-nwl.c
>
> diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c
> new file mode 100644
> index 0000000..8bc509c
> --- /dev/null
> +++ b/drivers/pci/host/pcie-xilinx-nwl.c
[...]
> +static struct msi_domain_info nwl_msi_domain_info = {
> + .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> + MSI_FLAG_MULTI_PCI_MSI),
Given that you claim to support multi-MSI...
[...]
> +static int nwl_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
> + unsigned int nr_irqs, void *args)
> +{
> + struct nwl_pcie *pcie = domain->host_data;
> + struct nwl_msi *msi = &pcie->msi;
> + unsigned long bit;
> + int i;
> +
> + mutex_lock(&msi->lock);
> + for (i = 0; i < nr_irqs; i++) {
> + bit = find_first_zero_bit(msi->used, INT_PCI_MSI_NR);
> + if (bit < INT_PCI_MSI_NR)
> + set_bit(bit, msi->used);
> + else
> + bit = -ENOSPC;
> +
> + if (bit < 0) {
> + mutex_unlock(&msi->lock);
> + return bit;
> + }
> +
> + irq_domain_set_info(domain, virq, bit, &nwl_irq_chip,
> + domain->host_data, handle_simple_irq,
> + NULL, NULL);
> + virq = virq + 1;
> + }
I really don't see how this allocator guarantees that all hwirqs are
contiguous. I already mentioned this when reviewing v7, and you still
haven't got it right. So either you allocate *contiguous* hwirqs in an
atomic fashion, or you drop support for multi-MSI.
Thanks,
M.
--
Jazz is not dead. It just smells funny.
next prev parent reply other threads:[~2015-11-11 17:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 6:33 [PATCH v8] PCI: Xilinx-NWL-PCIe: Added support for Xilinx NWL PCIe Host Controller Bharat Kumar Gogada
2015-11-11 17:37 ` Marc Zyngier [this message]
2015-11-17 5:06 ` Bharat Kumar Gogada
[not found] ` <1447223619-30945-1-git-send-email-bharatku-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2015-11-11 20:29 ` Rob Herring
2015-11-16 10:27 ` Bharat Kumar Gogada
2015-11-16 22:16 ` Ray Jui
2015-11-17 5:01 ` Bharat Kumar Gogada
2015-11-16 15:14 ` Marc Zyngier
2015-11-16 22:01 ` Ray Jui
2015-11-17 4:59 ` Bharat Kumar Gogada
2015-11-17 9:21 ` Marc Zyngier
[not found] ` <20151117092100.76babf7f-5wv7dgnIgG8@public.gmane.org>
2015-11-17 13:27 ` Bharat Kumar Gogada
2015-11-17 13:55 ` Marc Zyngier
2015-11-17 16:24 ` Ray Jui
2015-11-18 6:51 ` Bharat Kumar Gogada
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=20151111173712.7dde8a42@arm.com \
--to=marc.zyngier@arm.com \
--cc=Minghuan.Lian@freescale.com \
--cc=arnd@arndb.de \
--cc=bharat.kumar.gogada@xilinx.com \
--cc=bharatku@xilinx.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=dhdang@apm.com \
--cc=galak@codeaurora.org \
--cc=hauke@hauke-m.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=mark.rutland@arm.com \
--cc=michals@xilinx.com \
--cc=pawel.moll@arm.com \
--cc=rgummal@xilinx.com \
--cc=rjui@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sbranden@broadcom.com \
--cc=sorenb@xilinx.com \
--cc=tinamdar@apm.com \
--cc=treding@nvidia.com \
/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).