WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] make c/s 21089 work again with c/s 21092

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] make c/s 21089 work again with c/s 21092
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 13 Apr 2010 14:36:55 +0100
Cc: Bastian Blank <waldi@xxxxxxxxxx>
Delivery-date: Tue, 13 Apr 2010 06:37:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxx>

--- 2010-04-13.orig/xen/arch/x86/mpparse.c      2010-04-13 15:25:22.000000000 
+0200
+++ 2010-04-13/xen/arch/x86/mpparse.c   2010-04-13 15:26:38.000000000 +0200
@@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge
        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 trigge
        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  



Attachment: x86-startup-irq-from-setup-gsi-fix2.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>