Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753100AbbGWNNx (ORCPT ); Thu, 23 Jul 2015 09:13:53 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:33787 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752927AbbGWNNn (ORCPT ); Thu, 23 Jul 2015 09:13:43 -0400 Date: Thu, 23 Jul 2015 08:13:36 -0500 From: Bjorn Helgaas To: Marc Zyngier Cc: Thomas Gleixner , Jiang Liu , Jason Cooper , linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yijing Wang , Ma Jun , Lorenzo Pieralisi , Duc Dang Subject: Re: [PATCH v5 06/19] PCI/MSI: of: Allow msi_domain lookup using the host bridge node Message-ID: <20150723131336.GT21967@google.com> References: <1437643598-19795-1-git-send-email-marc.zyngier@arm.com> <1437643598-19795-7-git-send-email-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437643598-19795-7-git-send-email-marc.zyngier@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1528 Lines: 50 On Thu, Jul 23, 2015 at 10:26:25AM +0100, Marc Zyngier wrote: > 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. > > Signed-off-by: Marc Zyngier Acked-by: Bjorn Helgaas > --- > drivers/pci/of.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/of.c b/drivers/pci/of.c > index e2ebb7d..fcfdadf 100644 > --- a/drivers/pci/of.c > +++ b/drivers/pci/of.c > @@ -69,12 +69,21 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus) > > if (!bus->dev.of_node) > return NULL; > + > + /* 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) > d = irq_find_host(np); > + > return d; > #else > return NULL; > -- > 2.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/