From: Lucas Stach <l.stach@pengutronix.de>
To: Pratyush Anand <pratyush.anand@gmail.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Jason Cooper" <jason@lakedaemon.net>,
"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jingoo Han" <jg1.han@samsung.com>,
"Mohit Kumar" <mohit.kumar@st.com>,
kernel@pengutronix.de, "Marek Vašut" <marex@denx.de>,
"Richard Zhu" <richard.zhu@linaro.org>,
"Kishon Vijay Abraham I" <kishon@ti.com>,
"Pratyush ANAND" <pratyush.anand@st.com>
Subject: Re: [PATCH 1/4] PCI: allow MSI chip providers to implement their own multiple MSI setup
Date: Fri, 13 Jun 2014 16:20:18 +0200 [thread overview]
Message-ID: <1402669218.4802.3.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <CAHM4w1kfsVbcNquK4t1NJqYRc9Qrjg6JYNJuAV=cpZ81Zm-pnw@mail.gmail.com>
Hi Pratyush,
Am Freitag, den 13.06.2014, 11:12 +0530 schrieb Pratyush Anand:
> Hi Lucas,
>
>
> On Thu, Jun 5, 2014 at 8:16 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> > drivers/pci/msi.c | 3 +++
> > include/linux/msi.h | 2 ++
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> > index 27a7e67ddfe4..c45399d3061a 100644
> > --- a/drivers/pci/msi.c
> > +++ b/drivers/pci/msi.c
> > @@ -68,9 +68,12 @@ int __weak arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
> >
> > int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
> > {
> > + struct msi_chip *chip = dev->bus->msi;
> > struct msi_desc *entry;
> > int ret;
> >
> > + if (chip && chip->setup_irqs)
>
> I think, you should also check here for nvec > 1
No, nvec == 1 is just a special case and is perfectly valid.
>
> > + return chip->setup_irqs(chip, dev, nvec, type);
>
> Before return, shouldn't we set chip_data for all desc->irq?
Setting chip_data is done in the MSI irq domains map callback and is the
same for single or multiple MSI setup. No need to do anything special
here.
> > /*
> > * If an architecture wants to support multiple MSI, it needs to
> > * override arch_setup_msi_irqs()
>
> This comment can be modified like "If an architecture wants
> to support multiple MSI, it needs to either override arch_setup_msi_irqs()
> or provide support of setup_irqs."
>
Right, I'll extend that comment for v2.
Regards,
Lucas
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2014-06-13 14:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 14:46 [PATCH 0/4] proper multi MSI handling for designware host Lucas Stach
2014-06-05 14:46 ` [PATCH 1/4] PCI: allow MSI chip providers to implement their own multiple MSI setup Lucas Stach
2014-06-12 10:25 ` Jingoo Han
2014-06-12 12:57 ` Marek Vasut
2014-06-13 5:42 ` Pratyush Anand
2014-06-13 14:20 ` Lucas Stach [this message]
2014-06-14 8:45 ` Pratyush Anand
2014-06-30 16:35 ` Lucas Stach
2014-06-05 14:46 ` [PATCH 2/4] PCI: designware: remove bogus " Lucas Stach
2014-06-05 14:46 ` [PATCH 3/4] PCI: designware: remove open-coded bitmap operations Lucas Stach
2014-06-05 14:46 ` [PATCH 4/4] PCI: designware: implement multiple MSI irq setup Lucas Stach
2014-06-12 9:56 ` [PATCH 0/4] proper multi MSI handling for designware host Jingoo Han
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=1402669218.4802.3.camel@weser.hi.pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=bhelgaas@google.com \
--cc=jason@lakedaemon.net \
--cc=jg1.han@samsung.com \
--cc=kernel@pengutronix.de \
--cc=kishon@ti.com \
--cc=linux-pci@vger.kernel.org \
--cc=marex@denx.de \
--cc=mohit.kumar@st.com \
--cc=pratyush.anand@gmail.com \
--cc=pratyush.anand@st.com \
--cc=richard.zhu@linaro.org \
--cc=thomas.petazzoni@free-electrons.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).