aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/io_apic.c
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2011-09-05 15:09:24 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2011-09-05 15:09:24 +0100
commitfdf21233645251000b1c8c9c24fb0e8cd6e2ee24 (patch)
tree676af6d996ef3f506a74c41c060643dc21962930 /xen/arch/x86/io_apic.c
parent8d8bc3af8818ca8c3c4b2d20f898084cff8ac3cb (diff)
downloadxen-fdf21233645251000b1c8c9c24fb0e8cd6e2ee24.tar.gz
xen-fdf21233645251000b1c8c9c24fb0e8cd6e2ee24.tar.bz2
xen-fdf21233645251000b1c8c9c24fb0e8cd6e2ee24.zip
IRQ: Introduce old_vector to irq_cfg
Introduce old_vector to irq_cfg with the same principle as old_cpu_mask. This removes a brute force loop from __clear_irq_vector(), and paves the way to correct bitrotten logic elsewhere in the irq code. Signed-off-by Andrew Cooper <andrew.cooper3@citrix.com>
Diffstat (limited to 'xen/arch/x86/io_apic.c')
-rw-r--r--xen/arch/x86/io_apic.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 0fdcc7d694..bccd52be8e 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -488,11 +488,16 @@ fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs)
__get_cpu_var(vector_irq)[vector] = -1;
cfg->move_cleanup_count--;
- if ( cfg->move_cleanup_count == 0
- && cfg->used_vectors )
+ if ( cfg->move_cleanup_count == 0 )
{
- ASSERT(test_bit(vector, cfg->used_vectors));
- clear_bit(vector, cfg->used_vectors);
+ cfg->old_vector = IRQ_VECTOR_UNASSIGNED;
+ cpus_clear(cfg->old_cpu_mask);
+
+ if ( cfg->used_vectors )
+ {
+ ASSERT(test_bit(vector, cfg->used_vectors));
+ clear_bit(vector, cfg->used_vectors);
+ }
}
unlock:
spin_unlock(&desc->lock);