Skip to content

Commit 5942290

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
irqchip/riscv-imsic: Convert to msi_create_parent_irq_domain() helper
Now that we have a concise helper to create an MSI parent domain, switch the RISC-V letter soup over to that. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Nam Cao <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/b906a38d443577de45923b335d80fc54c5638da0.1750860131.git.namcao@linutronix.de Link: https://lore.kernel.org/all/20241204124549.607054-6-maz@kernel.org
1 parent 91650ca commit 5942290

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/irqchip/irq-riscv-imsic-platform.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,11 @@ static const struct msi_parent_ops imsic_msi_parent_ops = {
307307

308308
int imsic_irqdomain_init(void)
309309
{
310+
struct irq_domain_info info = {
311+
.fwnode = imsic->fwnode,
312+
.ops = &imsic_base_domain_ops,
313+
.host_data = imsic,
314+
};
310315
struct imsic_global_config *global;
311316

312317
if (!imsic || !imsic->fwnode) {
@@ -320,16 +325,11 @@ int imsic_irqdomain_init(void)
320325
}
321326

322327
/* Create Base IRQ domain */
323-
imsic->base_domain = irq_domain_create_tree(imsic->fwnode,
324-
&imsic_base_domain_ops, imsic);
328+
imsic->base_domain = msi_create_parent_irq_domain(&info, &imsic_msi_parent_ops);
325329
if (!imsic->base_domain) {
326330
pr_err("%pfwP: failed to create IMSIC base domain\n", imsic->fwnode);
327331
return -ENOMEM;
328332
}
329-
imsic->base_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
330-
imsic->base_domain->msi_parent_ops = &imsic_msi_parent_ops;
331-
332-
irq_domain_update_bus_token(imsic->base_domain, DOMAIN_BUS_NEXUS);
333333

334334
global = &imsic->global;
335335
pr_info("%pfwP: hart-index-bits: %d, guest-index-bits: %d\n",

0 commit comments

Comments
 (0)