Skip to content

Commit 1e46e04

Browse files
jhovoldMarc Zyngier
authored andcommitted
irqchip/gic-v3-its: Use irq_domain_create_hierarchy()
Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Note that the domain host_data was first set to the struct its_node during allocation only to immediately be overwritten with the struct msi_domain_info. Tested-by: Hsin-Yi Wang <[email protected]> Tested-by: Mark-PK Tsai <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e6e8cd6 commit 1e46e04

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4909,18 +4909,19 @@ static int its_init_domain(struct fwnode_handle *handle, struct its_node *its)
49094909
if (!info)
49104910
return -ENOMEM;
49114911

4912-
inner_domain = irq_domain_create_tree(handle, &its_domain_ops, its);
4912+
info->ops = &its_msi_domain_ops;
4913+
info->data = its;
4914+
4915+
inner_domain = irq_domain_create_hierarchy(its_parent,
4916+
its->msi_domain_flags, 0,
4917+
handle, &its_domain_ops,
4918+
info);
49134919
if (!inner_domain) {
49144920
kfree(info);
49154921
return -ENOMEM;
49164922
}
49174923

4918-
inner_domain->parent = its_parent;
49194924
irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_NEXUS);
4920-
inner_domain->flags |= its->msi_domain_flags;
4921-
info->ops = &its_msi_domain_ops;
4922-
info->data = its;
4923-
inner_domain->host_data = info;
49244925

49254926
return 0;
49264927
}

0 commit comments

Comments
 (0)