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-changelog

[Xen-changelog] [xen-unstable] x86: fix get_free_pirq

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: fix get_free_pirq
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Aug 2009 03:00:15 -0700
Delivery-date: Mon, 31 Aug 2009 03:00:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251708450 -3600
# Node ID eae7b5ee789738528dac5c309aabd6e316005e0f
# Parent  e8004f6c254a5778b50babd527e74208981640b9
x86: fix get_free_pirq

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>
---
 xen/arch/x86/irq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r e8004f6c254a -r eae7b5ee7897 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        Mon Aug 31 09:47:30 2009 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: fix get_free_pirq, Xen patchbot-unstable <=