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] x86: Initialize the affinity field after assigning t

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: Initialize the affinity field after assigning the vector.
From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Date: Wed, 21 Oct 2009 18:03:38 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 21 Oct 2009 03:05:27 -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
Thread-index: AcpSNcKTAKghkf+7S5iZslZcZW+lGg==
Thread-topic: [PATCH] x86: Initialize the affinity field after assigning the vector.
x86: Initialize the affinity field after assigning the vector.
 
To avoid strange output from debug-key "i", desc->affinity should
be the subset of the cfg->domain basically, so copy cfg->domain to 
desc->affinity after assigning vector for the irq..
 
Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
 
diff -r 3bbe9ab2202b xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c    Wed Oct 21 09:23:10 2009 +0100
+++ b/xen/arch/x86/irq.c    Wed Oct 21 17:47:50 2009 +0800
@@ -419,13 +419,16 @@ int assign_irq_vector(int irq)
     int ret;
     unsigned long flags;
     struct irq_cfg *cfg = &irq_cfg[irq];
+    struct irq_desc *desc = irq_to_desc(irq);
     
     BUG_ON(irq >= nr_irqs || irq <0);
 
     spin_lock_irqsave(&vector_lock, flags);
     ret = __assign_irq_vector(irq, cfg, TARGET_CPUS);
-    if (!ret)
+    if (!ret) {
         ret = cfg->vector;
+        cpus_copy(desc->affinity, cfg->domain);
+    }
     spin_unlock_irqrestore(&vector_lock, flags);
     return ret;
 }

Attachment: initialize-affinity-field-after-affigning-vector.patch
Description: initialize-affinity-field-after-affigning-vector.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: Initialize the affinity field after assigning the vector., Zhang, Xiantao <=