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] [LINUX] Clean up and clarify find_unbound

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Clean up and clarify find_unbound_irq().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Dec 2006 13:20:42 +0000
Delivery-date: Fri, 08 Dec 2006 05:23:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 1bcb97a1b2da29f4d432f4237570ff607fabcb5e
# Parent  3859131c0b8b1c6ef88db6622321146a9500f998
[LINUX] Clean up and clarify find_unbound_irq().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/evtchn.c |   32 +++++++++++--------------
 1 files changed, 15 insertions(+), 17 deletions(-)

diff -r 3859131c0b8b -r 1bcb97a1b2da 
linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c    Thu Dec 07 17:48:35 
2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c    Fri Dec 08 09:19:37 
2006 +0000
@@ -244,24 +244,22 @@ asmlinkage void evtchn_do_upcall(struct 
 
 static int find_unbound_irq(void)
 {
-       int irq;
-
-       /* Only allocate from dynirq range */
-       for (irq = DYNIRQ_BASE; irq < NR_IRQS; irq++)
+       static int warned;
+       int dynirq, irq;
+
+       for (dynirq = 0; dynirq < NR_DYNIRQS; dynirq++) {
+               irq = dynirq_to_irq(dynirq);
                if (irq_bindcount[irq] == 0)
-                       break;
-
-       if (irq == NR_IRQS) {
-               static int warned;
-               if (!warned) {
-                       warned = 1;
-                       printk(KERN_WARNING "No available IRQ to bind to: "
-                              "increase NR_IRQS!\n");
-               }
-               return -ENOSPC;
-       }
-
-       return irq;
+                       return irq;
+       }
+
+       if (!warned) {
+               warned = 1;
+               printk(KERN_WARNING "No available IRQ to bind to: "
+                      "increase NR_DYNIRQS.\n");
+       }
+
+       return -ENOSPC;
 }
 
 static int bind_evtchn_to_irq(unsigned int evtchn)

_______________________________________________
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] [LINUX] Clean up and clarify find_unbound_irq()., Xen patchbot-unstable <=