From: Marc Zyngier <marc.zyngier@arm.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Alex Shi <alex.shi@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
David Daney <ddaney.cavm@gmail.com>
Subject: [PATCH 2/2] irqchip/gic-v3-its: Count additional LPIs for the aliased devices
Date: Fri, 2 Oct 2015 16:44:06 +0100 [thread overview]
Message-ID: <1443800646-8074-3-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1443800646-8074-1-git-send-email-marc.zyngier@arm.com>
When configuring the interrupt mapping for a new device, we
iterate over all the possible aliases to account for their
maximum MSI allocation. This was introduced by e8137f4f5088
("irqchip: gicv3-its: Iterate over PCI aliases to generate ITS configuration").
Turns out that the code doing that is a bit braindead, and repeatedly
accounts for the same device over and over.
Fix this by counting the actual alias that is passed to us by the
core code.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/irqchip/irq-gic-v3-its-pci-msi.c | 2 +-
1 file changed, 1 insertion(+), 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..a7c8c9f 100644
--- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
@@ -62,7 +62,7 @@ static int its_get_pci_alias(struct pci_dev *pdev, u16 alias, void *data)
dev_alias->dev_id = alias;
if (pdev != dev_alias->pdev)
- dev_alias->count += its_pci_msi_vec_count(dev_alias->pdev);
+ dev_alias->count += its_pci_msi_vec_count(pdev);
return 0;
}
--
2.1.4
next prev parent reply other threads:[~2015-10-02 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 15:44 [PATCH 0/2] GICv3 ITS fixes for v4.3 Marc Zyngier
2015-10-02 15:44 ` [PATCH 1/2] irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined Marc Zyngier
2015-10-02 18:54 ` [tip:irq/urgent] " tip-bot for Marc Zyngier
2015-10-02 15:44 ` Marc Zyngier [this message]
2015-10-02 18:55 ` [tip:irq/urgent] irqchip/gic-v3-its: Count additional LPIs for the aliased devices tip-bot for 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=1443800646-8074-3-git-send-email-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=alex.shi@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=ddaney.cavm@gmail.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®