diff options
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 9ed796ccc32c..e63a5bd2a78f 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1534,6 +1534,11 @@ void intel_ir_io_apic_print_entries(unsigned int apic, | |||
1534 | } | 1534 | } |
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | void ioapic_zap_locks(void) | ||
1538 | { | ||
1539 | raw_spin_lock_init(&ioapic_lock); | ||
1540 | } | ||
1541 | |||
1537 | __apicdebuginit(void) print_IO_APIC(int ioapic_idx) | 1542 | __apicdebuginit(void) print_IO_APIC(int ioapic_idx) |
1538 | { | 1543 | { |
1539 | union IO_APIC_reg_00 reg_00; | 1544 | union IO_APIC_reg_00 reg_00; |
@@ -3375,12 +3380,15 @@ int io_apic_setup_irq_pin_once(unsigned int irq, int node, | |||
3375 | { | 3380 | { |
3376 | unsigned int ioapic_idx = attr->ioapic, pin = attr->ioapic_pin; | 3381 | unsigned int ioapic_idx = attr->ioapic, pin = attr->ioapic_pin; |
3377 | int ret; | 3382 | int ret; |
3383 | struct IO_APIC_route_entry orig_entry; | ||
3378 | 3384 | ||
3379 | /* Avoid redundant programming */ | 3385 | /* Avoid redundant programming */ |
3380 | if (test_bit(pin, ioapics[ioapic_idx].pin_programmed)) { | 3386 | if (test_bit(pin, ioapics[ioapic_idx].pin_programmed)) { |
3381 | pr_debug("Pin %d-%d already programmed\n", | 3387 | pr_debug("Pin %d-%d already programmed\n", mpc_ioapic_id(ioapic_idx), pin); |
3382 | mpc_ioapic_id(ioapic_idx), pin); | 3388 | orig_entry = ioapic_read_entry(attr->ioapic, pin); |
3383 | return 0; | 3389 | if (attr->trigger == orig_entry.trigger && attr->polarity == orig_entry.polarity) |
3390 | return 0; | ||
3391 | return -EBUSY; | ||
3384 | } | 3392 | } |
3385 | ret = io_apic_setup_irq_pin(irq, node, attr); | 3393 | ret = io_apic_setup_irq_pin(irq, node, attr); |
3386 | if (!ret) | 3394 | if (!ret) |