diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index c80081a6ba41..f71461b1f03d 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -750,6 +750,22 @@ static int assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result) | |||
750 | return vector; | 750 | return vector; |
751 | } | 751 | } |
752 | 752 | ||
753 | static void __clear_irq_vector(int irq) | ||
754 | { | ||
755 | cpumask_t mask; | ||
756 | int cpu, vector; | ||
757 | |||
758 | BUG_ON(!irq_vector[irq]); | ||
759 | |||
760 | vector = irq_vector[irq]; | ||
761 | cpus_and(mask, irq_domain[irq], cpu_online_map); | ||
762 | for_each_cpu_mask(cpu, mask) | ||
763 | per_cpu(vector_irq, cpu)[vector] = -1; | ||
764 | |||
765 | irq_vector[irq] = 0; | ||
766 | irq_domain[irq] = CPU_MASK_NONE; | ||
767 | } | ||
768 | |||
753 | void __setup_vector_irq(int cpu) | 769 | void __setup_vector_irq(int cpu) |
754 | { | 770 | { |
755 | /* Initialize vector_irq on a new cpu */ | 771 | /* Initialize vector_irq on a new cpu */ |
@@ -1837,7 +1853,7 @@ void destroy_irq(unsigned int irq) | |||
1837 | dynamic_irq_cleanup(irq); | 1853 | dynamic_irq_cleanup(irq); |
1838 | 1854 | ||
1839 | spin_lock_irqsave(&vector_lock, flags); | 1855 | spin_lock_irqsave(&vector_lock, flags); |
1840 | irq_vector[irq] = 0; | 1856 | __clear_irq_vector(irq); |
1841 | spin_unlock_irqrestore(&vector_lock, flags); | 1857 | spin_unlock_irqrestore(&vector_lock, flags); |
1842 | } | 1858 | } |
1843 | 1859 | ||