Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1190912 > unrolled thread

Re: [PATCH v5 06/19] PCI/MSI: of: Allow msi_domain lookup using the host bridge node

Started byBjorn Helgaas <bhelgaas@google.com>
First post2015-07-23 15:20 +0200
Last post2015-07-23 15:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 06/19] PCI/MSI: of: Allow msi_domain lookup using the  host bridge node Bjorn Helgaas <bhelgaas@google.com> - 2015-07-23 15:20 +0200

#1190912 — Re: [PATCH v5 06/19] PCI/MSI: of: Allow msi_domain lookup using the host bridge node

FromBjorn Helgaas <bhelgaas@google.com>
Date2015-07-23 15:20 +0200
SubjectRe: [PATCH v5 06/19] PCI/MSI: of: Allow msi_domain lookup using the host bridge node
Message-ID<pPozL-7MD-17@gated-at.bofh.it>
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 <marc.zyngier@arm.com>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web