WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/2] x86/IRQ: consolidate IRQ disabling when acquirin

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/2] x86/IRQ: consolidate IRQ disabling when acquiring vector lock
From: "Jan Beulich" <JBeulich@xxxxxxxx>
Date: Thu, 03 Nov 2011 14:27:27 +0000
Delivery-date: Thu, 03 Nov 2011 07:29:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxx>

--- 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 ir
 
     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;



Attachment: x86-vector-lock-flags.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>