From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482AbbG2W1M (ORCPT ); Wed, 29 Jul 2015 18:27:12 -0400 Received: from terminus.zytor.com ([198.137.202.10]:37037 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754460AbbG2W1J (ORCPT ); Wed, 29 Jul 2015 18:27:09 -0400 Date: Wed, 29 Jul 2015 15:26:31 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: bhelgaas@google.com, linux-arm-kernel@lists.infradead.org, jiang.liu@linux.intel.com, dhdang@apm.com, marc.zyngier@arm.com, tglx@linutronix.de, wangyijing@huawei.com, majun258@huawei.com, lorenzo.pieralisi@arm.com, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hanjun.guo@linaro.org, jason@lakedaemon.net Reply-To: linux-arm-kernel@lists.infradead.org, bhelgaas@google.com, wangyijing@huawei.com, tglx@linutronix.de, dhdang@apm.com, marc.zyngier@arm.com, jiang.liu@linux.intel.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, majun258@huawei.com, lorenzo.pieralisi@arm.com, jason@lakedaemon.net, hanjun.guo@linaro.org In-Reply-To: <1438091186-10244-7-git-send-email-marc.zyngier@arm.com> References: <1438091186-10244-7-git-send-email-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] PCI/MSI: Allow msi_domain lookup using the host bridge node Git-Commit-ID: 471c931cb248ab7af0cd62503d811239b47f217b 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: 471c931cb248ab7af0cd62503d811239b47f217b Gitweb: http://git.kernel.org/tip/471c931cb248ab7af0cd62503d811239b47f217b Author: Marc Zyngier AuthorDate: Tue, 28 Jul 2015 14:46:13 +0100 Committer: Thomas Gleixner CommitDate: Thu, 30 Jul 2015 00:14:37 +0200 PCI/MSI: Allow msi_domain lookup using the host bridge node A number of platforms do not need to use the msi-parent property, as the host bridge itself provides the MSI controller. Allow this configuration by performing an irq domain lookup based on the host bridge node if it doesn't have a valid msi-parent property. Acked-by: Bjorn Helgaas Signed-off-by: Marc Zyngier Cc: Cc: Yijing Wang Cc: Ma Jun Cc: Lorenzo Pieralisi Cc: Duc Dang Cc: Hanjun Guo Cc: Jiang Liu Cc: Jason Cooper Link: http://lkml.kernel.org/r/1438091186-10244-7-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner --- drivers/pci/of.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 85844d8..2e99a50 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -72,8 +72,13 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus) /* Start looking for a phandle to an MSI controller. */ np = of_parse_phandle(bus->dev.of_node, "msi-parent", 0); + + /* + * If we don't have an msi-parent property, look for a domain + * directly attached to the host bridge. + */ if (!np) - return NULL; + np = bus->dev.of_node; d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI); if (d)