From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Bharat Kumar Gogada <bharatku@xilinx.com>
Cc: "marc.zyngier@arm.com" <marc.zyngier@arm.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ravikiran Gummaluri <rgummal@xilinx.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4] PCI: xilinx-nwl: Fix Multi MSI data programming
Date: Tue, 18 Jun 2019 14:03:08 +0100 [thread overview]
Message-ID: <20190618130308.GA9002@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <CH2PR02MB6453032A01A540F5E9C58402A5EA0@CH2PR02MB6453.namprd02.prod.outlook.com>
On Tue, Jun 18, 2019 at 12:28:02PM +0000, Bharat Kumar Gogada wrote:
[...]
> > Applied to pci/xilinx for v5.3, please have a look and check if the commit log
> > I wrote provides a clear description of the issue.
> >
> > Lorenzo
> Thanks Lorenzo and Marc.
> Lorenzo, can you please point to link for above commit.
I did already.
Anyway:
https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/commit/?h=pci/xilinx&id=46c1bfcfcd873f8754f733e4258121748bcae3a3
> Regards,
> Bharat
> > > diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c
> > > b/drivers/pci/controller/pcie-xilinx-nwl.c
> > > index 81538d7..a9e07b8 100644
> > > --- a/drivers/pci/controller/pcie-xilinx-nwl.c
> > > +++ b/drivers/pci/controller/pcie-xilinx-nwl.c
> > > @@ -483,15 +483,13 @@ static int nwl_irq_domain_alloc(struct
> > irq_domain *domain, unsigned int virq,
> > > int i;
> > >
> > > mutex_lock(&msi->lock);
> > > - bit = bitmap_find_next_zero_area(msi->bitmap, INT_PCI_MSI_NR, 0,
> > > - nr_irqs, 0);
> > > - if (bit >= INT_PCI_MSI_NR) {
> > > + bit = bitmap_find_free_region(msi->bitmap, INT_PCI_MSI_NR,
> > > + get_count_order(nr_irqs));
> > > + if (bit < 0) {
> > > mutex_unlock(&msi->lock);
> > > return -ENOSPC;
> > > }
> > >
> > > - bitmap_set(msi->bitmap, bit, nr_irqs);
> > > -
> > > for (i = 0; i < nr_irqs; i++) {
> > > irq_domain_set_info(domain, virq + i, bit + i, &nwl_irq_chip,
> > > domain->host_data, handle_simple_irq, @@
> > -509,7 +507,8 @@ static
> > > void nwl_irq_domain_free(struct irq_domain *domain, unsigned int virq,
> > > struct nwl_msi *msi = &pcie->msi;
> > >
> > > mutex_lock(&msi->lock);
> > > - bitmap_clear(msi->bitmap, data->hwirq, nr_irqs);
> > > + bitmap_release_region(msi->bitmap, data->hwirq,
> > > + get_count_order(nr_irqs));
> > > mutex_unlock(&msi->lock);
> > > }
> > >
> > > --
> > > 2.7.4
> > >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-06-18 13:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 10:17 [PATCH v4] PCI: xilinx-nwl: Fix Multi MSI data programming Bharat Kumar Gogada
2019-06-12 13:01 ` Marc Zyngier
2019-06-12 16:31 ` Lorenzo Pieralisi
2019-06-17 9:21 ` Lorenzo Pieralisi
2019-06-18 12:28 ` Bharat Kumar Gogada
2019-06-18 13:03 ` Lorenzo Pieralisi [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=20190618130308.GA9002@e121166-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=bharatku@xilinx.com \
--cc=bhelgaas@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=rgummal@xilinx.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).