|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [LINUX] Clean up and clarify find_unbound
# 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 <=
|
|
|
|
|