Commit 8f5ad1a8 authored by Yasuaki Ishimatsu's avatar Yasuaki Ishimatsu Committed by Tony Luck

[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: default avatarYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 0de085bb
...@@ -212,9 +212,6 @@ assign_irq_vector (int irq) ...@@ -212,9 +212,6 @@ assign_irq_vector (int irq)
vector = -ENOSPC; vector = -ENOSPC;
spin_lock_irqsave(&vector_lock, flags); spin_lock_irqsave(&vector_lock, flags);
if (irq < 0) {
goto out;
}
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
domain = vector_allocation_domain(cpu); domain = vector_allocation_domain(cpu);
vector = find_unassigned_vector(domain); vector = find_unassigned_vector(domain);
...@@ -223,6 +220,8 @@ assign_irq_vector (int irq) ...@@ -223,6 +220,8 @@ assign_irq_vector (int irq)
} }
if (vector < 0) if (vector < 0)
goto out; goto out;
if (irq == AUTO_ASSIGN)
irq = vector;
BUG_ON(__bind_irq_vector(irq, vector, domain)); BUG_ON(__bind_irq_vector(irq, vector, domain));
out: out:
spin_unlock_irqrestore(&vector_lock, flags); spin_unlock_irqrestore(&vector_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment