]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] vector-domain - handle assign_irq_vector(AUTO_ASSIGN)
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Tue, 24 Jul 2007 13:09:09 +0000 (22:09 +0900)
committerTony Luck <tony.luck@intel.com>
Wed, 25 Jul 2007 18:05:48 +0000 (11:05 -0700)
This change fixes a panic when assign_irq_vector(irq) is called with
irq = AUTO_ASSIGN.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/irq_ia64.c

index 91797c11116218a254fdfe5496bbb19561ee9320..158eafb5f1aac9be701642342964919afce221c8 100644 (file)
@@ -212,9 +212,6 @@ assign_irq_vector (int irq)
        vector = -ENOSPC;
 
        spin_lock_irqsave(&vector_lock, flags);
-       if (irq < 0) {
-               goto out;
-       }
        for_each_online_cpu(cpu) {
                domain = vector_allocation_domain(cpu);
                vector = find_unassigned_vector(domain);
@@ -223,6 +220,8 @@ assign_irq_vector (int irq)
        }
        if (vector < 0)
                goto out;
+       if (irq == AUTO_ASSIGN)
+               irq = vector;
        BUG_ON(__bind_irq_vector(irq, vector, domain));
  out:
        spin_unlock_irqrestore(&vector_lock, flags);