devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Will Deacon <will.deacon@arm.com>
Cc: David Daney <ddaney@caviumnetworks.com>,
	David Daney <ddaney.cavm@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <Pawel.Moll@arm.com>,
	Mark Rutland <Mark.Rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v2 3/3] irqchip/gicv3-its:  Handle OF device tree "msi-map" properties.
Date: Wed, 23 Sep 2015 19:18:34 +0100	[thread overview]
Message-ID: <20150923191834.1764ca02@arm.com> (raw)
In-Reply-To: <20150923175259.GT7356@arm.com>

On Wed, 23 Sep 2015 18:52:59 +0100
Will Deacon <will.deacon@arm.com> wrote:

> On Wed, Sep 23, 2015 at 06:08:39PM +0100, David Daney wrote:
> > On 09/23/2015 10:01 AM, Marc Zyngier wrote:
> > > On Tue, 22 Sep 2015 17:00:06 -0700
> > > David Daney <ddaney.cavm@gmail.com> wrote:
> > >
> > >> From: David Daney <david.daney@cavium.com>
> > >>
> > >> Call of_msi_map_rid() to handle mapping of the requester id.
> > >>
> > >> Signed-off-by: David Daney <david.daney@cavium.com>
> > >> ---
> > >>   drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 ++-
> > >>   1 file changed, 2 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
> > >> index cf351c6..8b1c938 100644
> > >> --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
> > >> +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
> > >> @@ -86,7 +86,8 @@ static int its_pci_msi_prepare(struct irq_domain *domain, struct device *dev,
> > >>   	pci_for_each_dma_alias(pdev, its_get_pci_alias, &dev_alias);
> > >>
> > >>   	/* ITS specific DeviceID, as the core ITS ignores dev. */
> > >> -	info->scratchpad[0].ul = dev_alias.dev_id;
> > >> +	info->scratchpad[0].ul = of_msi_map_rid(dev, domain->of_node,
> > >> +						dev_alias.dev_id);
> > >>
> > >>   	return msi_info->ops->msi_prepare(domain->parent,
> > >>   					  dev, dev_alias.count, info);
> > >
> > > I really wonder if that shouldn't be part of the pci_for_each_dma_alias
> > > call. It would make a lot more sense for this functionality to be an
> > > integral part of the core code, and would probably make the integration
> > > of _IORT (which has the exact same requirements) a bit easier.
> > >
> > > Thoughts?
> > >
> > 
> > I am a proponent of pushing things like this as far into the core code 
> > as possible.  So, from that point of view, I think it would probably be 
> > a good idea.
> > 
> > I can prepare a patch that does that, but it would also be nice hear 
> > from other maintainers and get their thoughts on this.
> 
> Hmm, we use pci_for_each_dma_alias in the SMMU drivers to get the SID,
> so I'm not sure that using the MSI mapping is necessarily the right thing
> to do there. Maybe we should instead have dma_alias_to_msi_id helpers or
> something?

Yes, that's probably a sensible solution.

	M.
-- 
Jazz is not dead. It just smells funny.

  reply	other threads:[~2015-09-23 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23  0:00 [PATCH v2 0/3] of, irqchip/gicv3-its: Handle "msi-map" properties David Daney
     [not found] ` <1442966406-13198-1-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-23  0:00   ` [PATCH v2 1/3] Docs: dt: Add PCI MSI map bindings David Daney
     [not found]     ` <1442966406-13198-2-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-23 16:37       ` Marc Zyngier
2015-09-23  0:00 ` [PATCH v2 2/3] of/irq: Add new function of_msi_map_rid() David Daney
     [not found]   ` <1442966406-13198-3-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-23 16:52     ` Marc Zyngier
     [not found]       ` <20150923175216.3384d7b4-5wv7dgnIgG8@public.gmane.org>
2015-09-23 16:59         ` David Daney
2015-09-23 17:07     ` Rob Herring
     [not found]       ` <CAL_JsqKh0BaEOnjJYiDSa_unwm0MFqw+_wMEM+LOkvADSkfTkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-23 17:12         ` David Daney
2015-09-23  0:00 ` [PATCH v2 3/3] irqchip/gicv3-its: Handle OF device tree "msi-map" properties David Daney
     [not found]   ` <1442966406-13198-4-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-23 17:01     ` Marc Zyngier
2015-09-23 17:08       ` David Daney
2015-09-23 17:52         ` Will Deacon
2015-09-23 18:18           ` Marc Zyngier [this message]
     [not found]             ` <20150923191834.1764ca02-5wv7dgnIgG8@public.gmane.org>
2015-09-23 19:23               ` Robin Murphy

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=20150923191834.1764ca02@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=Pawel.Moll@arm.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.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).