]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/xen/events.c
Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / drivers / xen / events.c
index 6c8193046e0de5f463b44fd1737a8c284cb4c895..eb0dfdeaa9494ac3043f13db5cbd1bf0c0dd5751 100644 (file)
@@ -142,9 +142,6 @@ static void init_evtchn_cpu_bindings(void)
 
        /* By default all event channels notify CPU#0. */
        for_each_irq_desc(i, desc) {
-               if (!desc)
-                       continue;
-
                desc->affinity = cpumask_of_cpu(0);
        }
 #endif
@@ -233,6 +230,7 @@ static void unmask_evtchn(int port)
 static int find_unbound_irq(void)
 {
        int irq;
+       struct irq_desc *desc;
 
        /* Only allocate from dynirq range */
        for (irq = 0; irq < nr_irqs; irq++)
@@ -242,6 +240,10 @@ static int find_unbound_irq(void)
        if (irq == nr_irqs)
                panic("No available IRQ to bind to: increase nr_irqs!\n");
 
+       desc = irq_to_desc_alloc_cpu(irq, 0);
+       if (WARN_ON(desc == NULL))
+               return -1;
+
        return irq;
 }