[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix legacy irq allocation issue


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
  • Date: Fri, 19 Jun 2009 10:03:06 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc:
  • Delivery-date: Thu, 18 Jun 2009 19:05:51 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcnwghXvpFCkneNoSnu3RqkaGU95PA==
  • Thread-topic: [PATCH] Fix legacy irq allocation issue

When try to assign vector for irq, we should not assign vector for legacy irq, 
which has fixed mapped irq<->vector relationship.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>


diff -r 2acd065485e8 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c    Sun Jun 14 23:12:24 2009 +0800
+++ b/xen/arch/x86/irq.c    Wed Jun 17 08:51:43 2009 +0800
@@ -83,6 +83,12 @@ int assign_irq_vector(int irq)
     BUG_ON(irq >= nr_irqs && irq != AUTO_ASSIGN_IRQ);

     spin_lock(&vector_lock);
+
+    if ((irq != AUTO_ASSIGN_IRQ) && !IO_APIC_IRQ(irq))
+    {
+        spin_unlock(&vector_lock);
+        return LEGACY_VECTOR(irq);
+    }

     if ((irq != AUTO_ASSIGN_IRQ) && (IO_APIC_VECTOR(irq) > 0)) {
         spin_unlock(&vector_lock);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.