diff options
Diffstat (limited to 'arch/i386/kernel/io_apic.c')
-rw-r--r-- | arch/i386/kernel/io_apic.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 507983c513c3..ad84bc2802a6 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2624,18 +2624,16 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
2624 | 2624 | ||
2625 | static void target_ht_irq(unsigned int irq, unsigned int dest) | 2625 | static void target_ht_irq(unsigned int irq, unsigned int dest) |
2626 | { | 2626 | { |
2627 | u32 low, high; | 2627 | struct ht_irq_msg msg; |
2628 | low = read_ht_irq_low(irq); | 2628 | fetch_ht_irq_msg(irq, &msg); |
2629 | high = read_ht_irq_high(irq); | ||
2630 | 2629 | ||
2631 | low &= ~(HT_IRQ_LOW_DEST_ID_MASK); | 2630 | msg.address_lo &= ~(HT_IRQ_LOW_DEST_ID_MASK); |
2632 | high &= ~(HT_IRQ_HIGH_DEST_ID_MASK); | 2631 | msg.address_hi &= ~(HT_IRQ_HIGH_DEST_ID_MASK); |
2633 | 2632 | ||
2634 | low |= HT_IRQ_LOW_DEST_ID(dest); | 2633 | msg.address_lo |= HT_IRQ_LOW_DEST_ID(dest); |
2635 | high |= HT_IRQ_HIGH_DEST_ID(dest); | 2634 | msg.address_hi |= HT_IRQ_HIGH_DEST_ID(dest); |
2636 | 2635 | ||
2637 | write_ht_irq_low(irq, low); | 2636 | write_ht_irq_msg(irq, &msg); |
2638 | write_ht_irq_high(irq, high); | ||
2639 | } | 2637 | } |
2640 | 2638 | ||
2641 | static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) | 2639 | static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) |
@@ -2673,7 +2671,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
2673 | 2671 | ||
2674 | vector = assign_irq_vector(irq); | 2672 | vector = assign_irq_vector(irq); |
2675 | if (vector >= 0) { | 2673 | if (vector >= 0) { |
2676 | u32 low, high; | 2674 | struct ht_irq_msg msg; |
2677 | unsigned dest; | 2675 | unsigned dest; |
2678 | cpumask_t tmp; | 2676 | cpumask_t tmp; |
2679 | 2677 | ||
@@ -2681,9 +2679,10 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
2681 | cpu_set(vector >> 8, tmp); | 2679 | cpu_set(vector >> 8, tmp); |
2682 | dest = cpu_mask_to_apicid(tmp); | 2680 | dest = cpu_mask_to_apicid(tmp); |
2683 | 2681 | ||
2684 | high = HT_IRQ_HIGH_DEST_ID(dest); | 2682 | msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest); |
2685 | 2683 | ||
2686 | low = HT_IRQ_LOW_BASE | | 2684 | msg.address_lo = |
2685 | HT_IRQ_LOW_BASE | | ||
2687 | HT_IRQ_LOW_DEST_ID(dest) | | 2686 | HT_IRQ_LOW_DEST_ID(dest) | |
2688 | HT_IRQ_LOW_VECTOR(vector) | | 2687 | HT_IRQ_LOW_VECTOR(vector) | |
2689 | ((INT_DEST_MODE == 0) ? | 2688 | ((INT_DEST_MODE == 0) ? |
@@ -2695,8 +2694,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
2695 | HT_IRQ_LOW_MT_ARBITRATED) | | 2694 | HT_IRQ_LOW_MT_ARBITRATED) | |
2696 | HT_IRQ_LOW_IRQ_MASKED; | 2695 | HT_IRQ_LOW_IRQ_MASKED; |
2697 | 2696 | ||
2698 | write_ht_irq_low(irq, low); | 2697 | write_ht_irq_msg(irq, &msg); |
2699 | write_ht_irq_high(irq, high); | ||
2700 | 2698 | ||
2701 | set_irq_chip_and_handler_name(irq, &ht_irq_chip, | 2699 | set_irq_chip_and_handler_name(irq, &ht_irq_chip, |
2702 | handle_edge_irq, "edge"); | 2700 | handle_edge_irq, "edge"); |