aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/irq.c
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2012-02-07 18:44:12 +0000
committerAndrew Cooper <andrew.cooper3@citrix.com>2012-02-07 18:44:12 +0000
commit2ae8b9173fb2388af6514c730d620ed5f450bc34 (patch)
tree38a6a0de8164d46d9d6d930287dc0da6b01978d6 /xen/arch/x86/irq.c
parent7af6c7ad830ede5b9aad3fe58140e3f0aa0787af (diff)
downloadxen-2ae8b9173fb2388af6514c730d620ed5f450bc34.tar.gz
xen-2ae8b9173fb2388af6514c730d620ed5f450bc34.tar.bz2
xen-2ae8b9173fb2388af6514c730d620ed5f450bc34.zip
irq: Add extra debugging to help track down why an assertion is failing
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r--xen/arch/x86/irq.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index bbcfa0988a..e9e1a9e552 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -608,6 +608,8 @@ void move_native_irq(struct irq_desc *desc)
desc->handler->enable(desc);
}
+static void dump_irqs(unsigned char key);
+
fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs)
{
unsigned vector, me;
@@ -667,7 +669,18 @@ fastcall void smp_irq_move_cleanup_interrupt(struct cpu_user_regs *regs)
if ( desc->arch.used_vectors )
{
- ASSERT(test_bit(vector, desc->arch.used_vectors));
+ if ( unlikely(!test_bit(vector, desc->arch.used_vectors)) )
+ {
+ bitmap_scnlistprintf(keyhandler_scratch,
+ sizeof(keyhandler_scratch),
+ desc->arch.used_vectors->_bits,
+ NR_VECTORS);
+ printk("*** IRQ BUG found ***\n"
+ "CPU%d -Testing vector %d from bitmap %s\n",
+ me, vector, keyhandler_scratch);
+ dump_irqs('i');
+ BUG();
+ }
clear_bit(vector, desc->arch.used_vectors);
}
}