Commit 0380839d authored by Marc Zyngier's avatar Marc Zyngier Committed by Thomas Gleixner

PCI/MSI: Register irq domain with specific token

When creating a PCI/MSI domain, tag it with DOMAIN_BUS_PCI_MSI so
that it can be looked-up using irq_find_matching_host().
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Yijing Wang <wangyijing@huawei.com>
Cc: Ma Jun <majun258@huawei.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Duc Dang <dhdang@apm.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1438091186-10244-3-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ad3aedfb
...@@ -1273,12 +1273,19 @@ struct irq_domain *pci_msi_create_irq_domain(struct device_node *node, ...@@ -1273,12 +1273,19 @@ struct irq_domain *pci_msi_create_irq_domain(struct device_node *node,
struct msi_domain_info *info, struct msi_domain_info *info,
struct irq_domain *parent) struct irq_domain *parent)
{ {
struct irq_domain *domain;
if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS) if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS)
pci_msi_domain_update_dom_ops(info); pci_msi_domain_update_dom_ops(info);
if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS)
pci_msi_domain_update_chip_ops(info); pci_msi_domain_update_chip_ops(info);
return msi_create_irq_domain(node, info, parent); domain = msi_create_irq_domain(node, info, parent);
if (!domain)
return NULL;
domain->bus_token = DOMAIN_BUS_PCI_MSI;
return domain;
} }
/** /**
......
...@@ -54,6 +54,7 @@ struct irq_data; ...@@ -54,6 +54,7 @@ struct irq_data;
*/ */
enum irq_domain_bus_token { enum irq_domain_bus_token {
DOMAIN_BUS_ANY = 0, DOMAIN_BUS_ANY = 0,
DOMAIN_BUS_PCI_MSI,
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment