x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index
In commitb643128b91
("x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain") the I/O-APIC code was changed to find its parent irqdomain using irq_find_matching_fwspec(), but the key used for the lookup was wrong. It shouldn't use 'ioapic' which is the index into its own ioapics[] array. It should use the actual arbitration ID of the I/O-APIC in question, which is mpc_ioapic_id(ioapic). Fixes:b643128b91
("x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain") Reported-by: lkp <oliver.sang@intel.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/57adf2c305cd0c5e9d860b2f3007a7e676fd0f9f.camel@infradead.org
This commit is contained in:
parent
d981059e13
commit
f36a74b934
1 changed files with 2 additions and 2 deletions
|
@ -2345,14 +2345,14 @@ static int mp_irqdomain_create(int ioapic)
|
||||||
if (cfg->dev) {
|
if (cfg->dev) {
|
||||||
fn = of_node_to_fwnode(cfg->dev);
|
fn = of_node_to_fwnode(cfg->dev);
|
||||||
} else {
|
} else {
|
||||||
fn = irq_domain_alloc_named_id_fwnode("IO-APIC", ioapic);
|
fn = irq_domain_alloc_named_id_fwnode("IO-APIC", mpc_ioapic_id(ioapic));
|
||||||
if (!fn)
|
if (!fn)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
fwspec.fwnode = fn;
|
fwspec.fwnode = fn;
|
||||||
fwspec.param_count = 1;
|
fwspec.param_count = 1;
|
||||||
fwspec.param[0] = ioapic;
|
fwspec.param[0] = mpc_ioapic_id(ioapic);
|
||||||
|
|
||||||
parent = irq_find_matching_fwspec(&fwspec, DOMAIN_BUS_ANY);
|
parent = irq_find_matching_fwspec(&fwspec, DOMAIN_BUS_ANY);
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue