aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/irq_ia64.c
diff options
context:
space:
mode:
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>2007-07-24 09:09:09 -0400
committerTony Luck <tony.luck@intel.com>2007-07-25 14:05:48 -0400
commit8f5ad1a8227aa110d633b5ed04dde535381c16c7 (patch)
treef5f86d26c6225a48fa689a009db98a3cc6f46057 /arch/ia64/kernel/irq_ia64.c
parent0de085bb474f64e4fdb2f1ff3268590792648c7b (diff)
[IA64] vector-domain - handle assign_irq_vector(AUTO_ASSIGN)
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>
Diffstat (limited to 'arch/ia64/kernel/irq_ia64.c')
-rw-r--r--arch/ia64/kernel/irq_ia64.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 91797c111162..158eafb5f1aa 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -212,9 +212,6 @@ assign_irq_vector (int irq)
212 vector = -ENOSPC; 212 vector = -ENOSPC;
213 213
214 spin_lock_irqsave(&vector_lock, flags); 214 spin_lock_irqsave(&vector_lock, flags);
215 if (irq < 0) {
216 goto out;
217 }
218 for_each_online_cpu(cpu) { 215 for_each_online_cpu(cpu) {
219 domain = vector_allocation_domain(cpu); 216 domain = vector_allocation_domain(cpu);
220 vector = find_unassigned_vector(domain); 217 vector = find_unassigned_vector(domain);
@@ -223,6 +220,8 @@ assign_irq_vector (int irq)
223 } 220 }
224 if (vector < 0) 221 if (vector < 0)
225 goto out; 222 goto out;
223 if (irq == AUTO_ASSIGN)
224 irq = vector;
226 BUG_ON(__bind_irq_vector(irq, vector, domain)); 225 BUG_ON(__bind_irq_vector(irq, vector, domain));
227 out: 226 out:
228 spin_unlock_irqrestore(&vector_lock, flags); 227 spin_unlock_irqrestore(&vector_lock, flags);