debuggers.hg

changeset 21207:0bebb5fa4f05

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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 13 15:38:27 2010 +0100 (2010-04-13)
parents 859a372efa66
children e2ec5cd8b396
files xen/arch/x86/mpparse.c
line diff
     1.1 --- a/xen/arch/x86/mpparse.c	Tue Apr 13 13:40:58 2010 +0100
     1.2 +++ b/xen/arch/x86/mpparse.c	Tue Apr 13 15:38:27 2010 +0100
     1.3 @@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge
     1.4  	int			ioapic = -1;
     1.5  	int			ioapic_pin = 0;
     1.6  	int			idx, bit = 0;
     1.7 +	struct irq_desc *	desc;
     1.8 +	unsigned long		flags;
     1.9  
    1.10  	/*
    1.11  	 * Mapping between Global System Interrups, which
    1.12 @@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge
    1.13  	if (ioapic_renumber_irq)
    1.14  		gsi = ioapic_renumber_irq(ioapic, gsi);
    1.15  
    1.16 -	if (!(irq_to_desc(gsi)->status & IRQ_DISABLED))
    1.17 +	desc = irq_to_desc(gsi);
    1.18 +	spin_lock_irqsave(&desc->lock, flags);
    1.19 +	if (!(desc->status & IRQ_DISABLED) && desc->handler != &no_irq_type) {
    1.20 +		spin_unlock_irqrestore(&desc->lock, flags);
    1.21  		return -EEXIST;
    1.22 +	}
    1.23 +	spin_unlock_irqrestore(&desc->lock, flags);
    1.24  
    1.25  	/* 
    1.26  	 * Avoid pin reprogramming.  PRTs typically include entries