From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753297AbbJBSzX (ORCPT ); Fri, 2 Oct 2015 14:55:23 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49847 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbbJBSzV (ORCPT ); Fri, 2 Oct 2015 14:55:21 -0400 Date: Fri, 2 Oct 2015 11:55:02 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, jason@lakedaemon.net, tglx@linutronix.de, ddaney.cavm@gmail.com, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, alex.shi@linaro.org, mingo@kernel.org Reply-To: tglx@linutronix.de, hpa@zytor.com, jason@lakedaemon.net, linux-kernel@vger.kernel.org, mingo@kernel.org, alex.shi@linaro.org, ard.biesheuvel@linaro.org, ddaney.cavm@gmail.com, marc.zyngier@arm.com In-Reply-To: <1443800646-8074-3-git-send-email-marc.zyngier@arm.com> References: <1443800646-8074-3-git-send-email-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/urgent] irqchip/gic-v3-its: Count additional LPIs for the aliased devices Git-Commit-ID: 791c76d58465a248cbd1ee422c8075cb90fa615f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 791c76d58465a248cbd1ee422c8075cb90fa615f Gitweb: http://git.kernel.org/tip/791c76d58465a248cbd1ee422c8075cb90fa615f Author: Marc Zyngier AuthorDate: Fri, 2 Oct 2015 16:44:06 +0100 Committer: Thomas Gleixner CommitDate: Fri, 2 Oct 2015 20:51:41 +0200 irqchip/gic-v3-its: Count additional LPIs for the aliased devices 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 Cc: linux-arm-kernel@lists.infradead.org Cc: Alex Shi Cc: Ard Biesheuvel Cc: David Daney Cc: Jason Cooper Link: http://lkml.kernel.org/r/1443800646-8074-3-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner --- 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; }