Skip to content

Commit bc1bc1b

Browse files
jhovoldMarc Zyngier
authored andcommitted
x86/ioapic: 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. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> 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 930a1bb commit bc1bc1b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/x86/kernel/apic/io_apic.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,18 +2364,15 @@ static int mp_irqdomain_create(int ioapic)
23642364
return -ENODEV;
23652365
}
23662366

2367-
ip->irqdomain = irq_domain_create_linear(fn, hwirqs, cfg->ops,
2368-
(void *)(long)ioapic);
2369-
2367+
ip->irqdomain = irq_domain_create_hierarchy(parent, 0, hwirqs, fn, cfg->ops,
2368+
(void *)(long)ioapic);
23702369
if (!ip->irqdomain) {
23712370
/* Release fw handle if it was allocated above */
23722371
if (!cfg->dev)
23732372
irq_domain_free_fwnode(fn);
23742373
return -ENOMEM;
23752374
}
23762375

2377-
ip->irqdomain->parent = parent;
2378-
23792376
if (cfg->type == IOAPIC_DOMAIN_LEGACY ||
23802377
cfg->type == IOAPIC_DOMAIN_STRICT)
23812378
ioapic_dynirq_base = max(ioapic_dynirq_base,

0 commit comments

Comments
 (0)