summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-07-28 14:46:09 +0100
committerThomas Gleixner <tglx@linutronix.de>2015-07-30 00:14:37 +0200
commit0380839dc90c53e24ddfa0f17ad909c2ddc345c2 (patch)
treeccb70f14824b7626f8ed25c2795e72c3b6b8de66 /drivers/pci
parentad3aedfbb04b3a2af54473cfe31f13953cfe9d84 (diff)
downloadop-kernel-dev-0380839dc90c53e24ddfa0f17ad909c2ddc345c2.zip
op-kernel-dev-0380839dc90c53e24ddfa0f17ad909c2ddc345c2.tar.gz
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: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Marc 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.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index cd4c78c..3aae7c9 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1273,12 +1273,19 @@ struct irq_domain *pci_msi_create_irq_domain(struct device_node *node,
struct msi_domain_info *info,
struct irq_domain *parent)
{
+ struct irq_domain *domain;
+
if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS)
pci_msi_domain_update_dom_ops(info);
if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS)
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;
}
/**
OpenPOWER on IntegriCloud