From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jiang Liu <jiang.liu@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3] irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token
Date: Tue, 26 Jan 2016 16:33:14 +0100 [thread overview]
Message-ID: <20160126163314.3a3e5b67@free-electrons.com> (raw)
In-Reply-To: <1453816347-32720-2-git-send-email-marc.zyngier@arm.com>
Dear Marc Zyngier,
On Tue, 26 Jan 2016 13:52:25 +0000, Marc Zyngier wrote:
> Let's take the (outlandish) example of an interrupt controller
> capable of handling both wired interrupts and PCI MSIs.
>
> With the current code, the PCI MSI domain is going to be tagged
> with DOMAIN_BUS_PCI_MSI, and the wired domain with DOMAIN_BUS_ANY.
>
> Things get hairy when we start looking up the domain for a wired
> interrupt (typically when creating it based on some firmware
> information - DT or ACPI).
>
> In irq_create_fwspec_mapping(), we perform the lookup using
> DOMAIN_BUS_ANY, which is actually used as a wildcard. This gives
> us one chance out of two to end up with the wrong domain, and
> we try to configure a wired interrupt with the MSI domain.
> Everything grinds to a halt pretty quickly.
>
> What we really need to do is to start looking for a domain that
> would uniquely identify a wired interrupt domain, and only use
> DOMAIN_BUS_ANY as a fallback.
>
> In order to solve this, let's introduce a new DOMAIN_BUS_WIRED
> token, which is going to be used exactly as described above.
> Of course, this depends on the irqchip to setup the domain
> bus_token, and nobody had to implement this so far.
>
> Only so far.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- On Marvell Armada XP, which uses the Marvell MPIC for both wired
interrupts and MSI interrupts
- On Marvell Armada 38x, which uses the ARM GIC for most wired
interrupts and the Marvell MPIC for MSI interrupts
With an Intel e1000e PCIe NIC, with both PCI_MSI=y and PCI_MSI disabled
cases have been tested. When MSI support is disabled it gracefully
falls back to a wired interrupt, as expected.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-01-26 15:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 13:52 [PATCH 0/3] irqdomain fixes for 4.5-rc1 Marc Zyngier
2016-01-26 13:52 ` [PATCH 1/3] irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token Marc Zyngier
2016-01-26 15:33 ` Thomas Petazzoni [this message]
2016-01-26 13:52 ` [PATCH 2/3] of: MSI: Simplify irqdomain lookup Marc Zyngier
[not found] ` <1453816347-32720-3-git-send-email-marc.zyngier-5wv7dgnIgG8@public.gmane.org>
2016-01-26 14:49 ` Rob Herring
2016-01-26 15:33 ` Thomas Petazzoni
[not found] ` <1453816347-32720-1-git-send-email-marc.zyngier-5wv7dgnIgG8@public.gmane.org>
2016-01-26 13:52 ` [PATCH 3/3] base: Export platform_msi_domain_{alloc,free}_irqs Marc Zyngier
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=20160126163314.3a3e5b67@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jiang.liu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
/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).