aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/irq.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-11-03 17:28:41 +0100
committerJan Beulich <jbeulich@suse.com>2011-11-03 17:28:41 +0100
commit948d141b1a833b40342165ccb5681d9ef53cd420 (patch)
tree1865a68a369146b9999bbb253ffb6a0664923634 /xen/arch/x86/irq.c
parent792920245b119b7ff8decef93bfaa84b21e0e8bb (diff)
downloadxen-948d141b1a833b40342165ccb5681d9ef53cd420.tar.gz
xen-948d141b1a833b40342165ccb5681d9ef53cd420.tar.bz2
xen-948d141b1a833b40342165ccb5681d9ef53cd420.zip
x86/IRQ: consolidate IRQ disabling when acquiring vector lock
__assign_irq_vector() doesn't need to disable interrupts (its callers are required to when acquiring the lock), and set_desc_affinity() can use the normal spin lock primitives. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r--xen/arch/x86/irq.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 96045cdf67..6875eb36bd 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -429,7 +429,6 @@ static int __assign_irq_vector(
static int current_vector = FIRST_DYNAMIC_VECTOR, current_offset = 0;
unsigned int old_vector;
int cpu, err;
- unsigned long flags;
cpumask_t tmp_mask;
vmask_t *irq_used_vectors = NULL;
@@ -493,7 +492,6 @@ next:
/* Found one! */
current_vector = vector;
current_offset = offset;
- local_irq_save(flags);
if (old_vector) {
desc->arch.move_in_progress = 1;
cpumask_copy(desc->arch.old_cpu_mask, desc->arch.cpu_mask);
@@ -521,7 +519,6 @@ next:
}
err = 0;
- local_irq_restore(flags);
break;
}
return err;
@@ -720,11 +717,9 @@ unsigned int set_desc_affinity(struct irq_desc *desc, const cpumask_t *mask)
irq = desc->irq;
- local_irq_save(flags);
- lock_vector_lock();
+ spin_lock_irqsave(&vector_lock, flags);
ret = __assign_irq_vector(irq, desc, mask);
- unlock_vector_lock();
- local_irq_restore(flags);
+ spin_unlock_irqrestore(&vector_lock, flags);
if (ret < 0)
return BAD_APICID;