diff options
Diffstat (limited to 'arch/x86/kernel/devicetree.c')
-rw-r--r-- | arch/x86/kernel/devicetree.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 706a9fb46a58..690bc8461835 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -369,6 +369,7 @@ static struct of_ioapic_type of_ioapic_type[] = | |||
369 | static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize, | 369 | static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize, |
370 | u32 *out_hwirq, u32 *out_type) | 370 | u32 *out_hwirq, u32 *out_type) |
371 | { | 371 | { |
372 | struct mp_ioapic_gsi *gsi_cfg; | ||
372 | struct io_apic_irq_attr attr; | 373 | struct io_apic_irq_attr attr; |
373 | struct of_ioapic_type *it; | 374 | struct of_ioapic_type *it; |
374 | u32 line, idx, type; | 375 | u32 line, idx, type; |
@@ -378,7 +379,8 @@ static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize, | |||
378 | 379 | ||
379 | line = *intspec; | 380 | line = *intspec; |
380 | idx = (u32) id->priv; | 381 | idx = (u32) id->priv; |
381 | *out_hwirq = line + mp_gsi_routing[idx].gsi_base; | 382 | gsi_cfg = mp_ioapic_gsi_routing(idx); |
383 | *out_hwirq = line + gsi_cfg->gsi_base; | ||
382 | 384 | ||
383 | intspec++; | 385 | intspec++; |
384 | type = *intspec; | 386 | type = *intspec; |
@@ -391,7 +393,7 @@ static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize, | |||
391 | 393 | ||
392 | set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity); | 394 | set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity); |
393 | 395 | ||
394 | return io_apic_setup_irq_pin(*out_hwirq, cpu_to_node(0), &attr); | 396 | return io_apic_setup_irq_pin_once(*out_hwirq, cpu_to_node(0), &attr); |
395 | } | 397 | } |
396 | 398 | ||
397 | static void __init ioapic_add_ofnode(struct device_node *np) | 399 | static void __init ioapic_add_ofnode(struct device_node *np) |
@@ -407,7 +409,7 @@ static void __init ioapic_add_ofnode(struct device_node *np) | |||
407 | } | 409 | } |
408 | 410 | ||
409 | for (i = 0; i < nr_ioapics; i++) { | 411 | for (i = 0; i < nr_ioapics; i++) { |
410 | if (r.start == mp_ioapics[i].apicaddr) { | 412 | if (r.start == mpc_ioapic_addr(i)) { |
411 | struct irq_domain *id; | 413 | struct irq_domain *id; |
412 | 414 | ||
413 | id = kzalloc(sizeof(*id), GFP_KERNEL); | 415 | id = kzalloc(sizeof(*id), GFP_KERNEL); |