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] fix get_free_pirq

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fix get_free_pirq
From: Qing He <qing.he@xxxxxxxxx>
Date: Fri, 28 Aug 2009 16:03:20 +0800
Cc: keir.fraser@xxxxxxxxxxxxx
Delivery-date: Fri, 28 Aug 2009 00:59:17 -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
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
GSI should not be allocated for other purpose, so change
the hard code limit.

Also fix the out of loop checking, it should be '<' instead of
'=='.

Signed-off-by: Qing He <qing.he@xxxxxxxxx>

---
diff -r e8004f6c254a xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Thu Aug 27 11:25:34 2009 +0100
+++ b/xen/arch/x86/irq.c        Fri Aug 28 14:06:43 2009 +0800
@@ -1254,10 +1254,10 @@ int get_free_pirq(struct domain *d, int 
     }
     else
     {
-        for ( i = d->nr_pirqs - 1; i >= 16; i-- )
+        for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
             if ( !d->arch.pirq_irq[i] )
                 break;
-        if ( i == 16 )
+        if ( i < nr_irqs_gsi )
             return -ENOSPC;
     }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix get_free_pirq, Qing He <=