@@ -118,7 +118,7 @@ static int __init its_pci_msi_init(void)
if (!of_property_read_bool(np, "msi-controller"))
continue;
- parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS);
+ parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS, NULL);
if (!parent || !msi_get_domain_info(parent)) {
pr_err("%s: unable to locate ITS domain\n",
np->full_name);
@@ -71,7 +71,7 @@ static int __init its_pmsi_init(void)
if (!of_property_read_bool(np, "msi-controller"))
continue;
- parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS);
+ parent = irq_find_matching_host(np, DOMAIN_BUS_NEXUS, NULL);
if (!parent || !msi_get_domain_info(parent)) {
pr_err("%s: unable to locate ITS domain\n",
np->full_name);
@@ -593,7 +593,7 @@ void of_msi_configure(struct device *dev, struct device_node *np)
if (!msi_np)
return;
- d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI);
+ d = irq_find_matching_host(msi_np, DOMAIN_BUS_PLATFORM_MSI, NULL);
if (!d)
d = irq_find_host(msi_np);
dev_set_msi_domain(dev, d);
@@ -80,7 +80,7 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus)
if (!np)
np = bus->dev.of_node;
- d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI);
+ d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI, NULL);
if (d)
return d;
@@ -178,12 +178,13 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
const struct irq_domain_ops *ops,
void *host_data);
extern struct irq_domain *irq_find_matching_host(struct device_node *node,
- enum irq_domain_bus_token bus_token);
+ enum irq_domain_bus_token bus_token,
+ void *bus_data);
extern void irq_set_default_host(struct irq_domain *host);
static inline struct irq_domain *irq_find_host(struct device_node *node)
{
- return irq_find_matching_host(node, DOMAIN_BUS_ANY);
+ return irq_find_matching_host(node, DOMAIN_BUS_ANY, NULL);
}
/**
@@ -190,9 +190,11 @@ EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
* irq_find_matching_host() - Locates a domain for a given device node
* @node: device-tree node of the interrupt controller
* @bus_token: domain-specific data
+ * @bus_data: bus-specific data
*/
struct irq_domain *irq_find_matching_host(struct device_node *node,
- enum irq_domain_bus_token bus_token)
+ enum irq_domain_bus_token bus_token,
+ void *bus_data)
{
struct irq_domain *h, *found = NULL;
int rc;
@@ -209,7 +211,7 @@ struct irq_domain *irq_find_matching_host(struct device_node *node,
mutex_lock(&irq_domain_mutex);
list_for_each_entry(h, &irq_domain_list, link) {
if (h->ops->match)
- rc = h->ops->match(h, node, bus_token, NULL);
+ rc = h->ops->match(h, node, bus_token, bus_data);
else
rc = ((h->of_node != NULL) && (h->of_node == node) &&
((bus_token == DOMAIN_BUS_ANY) ||