@@ -229,16 +229,14 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
return -ENODEV;
}
- inner_domain = irq_domain_create_hierarchy(parent_domain, 0,
- gicp->spi_cnt,
- of_node_to_fwnode(node),
- &gicp_domain_ops, gicp);
+ inner_domain = msi_create_parent_irq_domain(of_node_to_fwnode(node),
+ &gicp_msi_parent_ops,
+ &gicp_domain_ops,
+ 0, gicp->spi_cnt, gicp,
+ parent_domain);
if (!inner_domain)
return -ENOMEM;
- irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_GENERIC_MSI);
- inner_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
- inner_domain->msi_parent_ops = &gicp_msi_parent_ops;
return 0;
}
@@ -204,19 +204,16 @@ static int __init mvebu_odmi_init(struct device_node *node,
parent_domain = irq_find_host(parent);
- inner_domain = irq_domain_create_hierarchy(parent_domain, 0,
- odmis_count * NODMIS_PER_FRAME,
- of_node_to_fwnode(node),
- &odmi_domain_ops, NULL);
+ inner_domain = msi_create_parent_irq_domain(of_node_to_fwnode(node),
+ &odmi_msi_parent_ops,
+ &odmi_domain_ops, 0,
+ odmis_count * NODMIS_PER_FRAME,
+ NULL, parent_domain);
if (!inner_domain) {
ret = -ENOMEM;
goto err_unmap;
}
- irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_GENERIC_MSI);
- inner_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
- inner_domain->msi_parent_ops = &odmi_msi_parent_ops;
-
return 0;
err_unmap:
@@ -429,21 +429,17 @@ static int mvebu_sei_probe(struct platform_device *pdev)
irq_domain_update_bus_token(sei->ap_domain, DOMAIN_BUS_WIRED);
/* Create the 'MSI' domain */
- sei->cp_domain = irq_domain_create_hierarchy(sei->sei_domain, 0,
- sei->caps->cp_range.size,
- of_node_to_fwnode(node),
- &mvebu_sei_cp_domain_ops,
- sei);
+ sei->cp_domain = msi_create_parent_irq_domain(of_node_to_fwnode(node),
+ &sei_msi_parent_ops,
+ &mvebu_sei_cp_domain_ops,
+ 0, sei->caps->cp_range.size,
+ sei, sei->sei_domain);
if (!sei->cp_domain) {
pr_err("Failed to create CPs IRQ domain\n");
ret = -ENOMEM;
goto remove_ap_domain;
}
- irq_domain_update_bus_token(sei->cp_domain, DOMAIN_BUS_GENERIC_MSI);
- sei->cp_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
- sei->cp_domain->msi_parent_ops = &sei_msi_parent_ops;
-
mvebu_sei_reset(sei);
irq_set_chained_handler_and_data(parent_irq, mvebu_sei_handle_cascade_irq, sei);
Now that we have a concise helper to create an MSI parent domain, switch the mvebu family of interrupt controllers over to that. Signed-off-by: Marc Zyngier <maz@kernel.org> --- drivers/irqchip/irq-mvebu-gicp.c | 12 +++++------- drivers/irqchip/irq-mvebu-odmi.c | 13 +++++-------- drivers/irqchip/irq-mvebu-sei.c | 14 +++++--------- 3 files changed, 15 insertions(+), 24 deletions(-)