Skip to content

Commit

Permalink
[IA64] vector-domain - handle assign_irq_vector(AUTO_ASSIGN)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yasuaki Ishimatsu authored and Tony Luck committed Jul 25, 2007
1 parent 0de085b commit 8f5ad1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/ia64/kernel/irq_ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 8f5ad1a

Please sign in to comment.