diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-04-13 15:38:27 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-04-13 15:38:27 +0100 |
commit | 70121cba8fd66557f88b4dc685c3fcbc4d9a44aa (patch) | |
tree | 13f19731b8d7729379c5df700a1c2e148971dfa6 /xen/arch/x86/mpparse.c | |
parent | 2bd42d61f1a6337e7fae6906c0001e44764c4b25 (diff) | |
download | xen-70121cba8fd66557f88b4dc685c3fcbc4d9a44aa.tar.gz xen-70121cba8fd66557f88b4dc685c3fcbc4d9a44aa.tar.bz2 xen-70121cba8fd66557f88b4dc685c3fcbc4d9a44aa.zip |
Make c/s 21089 work again with c/s 21092
Unfortunately the latter c/s' change to mpparse.c yielded the former
patch non-functional - Xen's serial port IRQ is not in IQR_DISABLED
state, yet must be allowed to get its trigger mode and polarity set
up in order for it to be usable.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/mpparse.c')
-rw-r--r-- | xen/arch/x86/mpparse.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index 95aff543f2..a7007d64d0 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity) int ioapic = -1; int ioapic_pin = 0; int idx, bit = 0; + struct irq_desc * desc; + unsigned long flags; /* * Mapping between Global System Interrups, which @@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity) if (ioapic_renumber_irq) gsi = ioapic_renumber_irq(ioapic, gsi); - if (!(irq_to_desc(gsi)->status & IRQ_DISABLED)) + desc = irq_to_desc(gsi); + spin_lock_irqsave(&desc->lock, flags); + if (!(desc->status & IRQ_DISABLED) && desc->handler != &no_irq_type) { + spin_unlock_irqrestore(&desc->lock, flags); return -EEXIST; + } + spin_unlock_irqrestore(&desc->lock, flags); /* * Avoid pin reprogramming. PRTs typically include entries |