Skip to content

Commit a97b852

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
genirq/msi: Populate the domain name if provided by the irqchip
In order to ease debug, let's populate the domain name upfront, before any MSI gets requested. This allows the domain to appear in the irq_domain_mapping, and the user to easily find the expected data. Signed-off-by: Marc Zyngier <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 2370c00 commit a97b852

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

kernel/irq/msi.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,19 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode,
265265
struct msi_domain_info *info,
266266
struct irq_domain *parent)
267267
{
268+
struct irq_domain *domain;
269+
268270
if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS)
269271
msi_domain_update_dom_ops(info);
270272
if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS)
271273
msi_domain_update_chip_ops(info);
272274

273-
return irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0,
274-
fwnode, &msi_domain_ops, info);
275+
domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0,
276+
fwnode, &msi_domain_ops, info);
277+
if (domain && info->chip && info->chip->name)
278+
domain->name = info->chip->name;
279+
280+
return domain;
275281
}
276282

277283
int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev,

0 commit comments

Comments
 (0)