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-changelog

[Xen-changelog] [xen-3.4-testing] vt-d: some small fixes to apic_pin_2_i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] vt-d: some small fixes to apic_pin_2_ir_idx
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Oct 2009 08:25:12 -0700
Delivery-date: Thu, 01 Oct 2009 08:25:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1254408966 -3600
# Node ID 065976816758044334a4f6326c1637e1f263c59f
# Parent  7422afed66ee9a48c1ab68a98ecaecff5de70eaf
vt-d: some small fixes to apic_pin_2_ir_idx

1) apic_pin_2_ir_idx should be int** rahter than unsigned int**,
because we use the int -1 to indicate that the related IRTE index is
not allocated.
2) shouldn't re-init apic_pin_2_ir_idx when resuming from S3.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
xen-unstable changeset:   20177:ac096fe31a63
xen-unstable date:        Mon Sep 07 13:51:55 2009 +0100
---
 xen/drivers/passthrough/vtd/intremap.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r 7422afed66ee -r 065976816758 xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c    Mon Sep 07 08:53:07 2009 +0100
+++ b/xen/drivers/passthrough/vtd/intremap.c    Thu Oct 01 15:56:06 2009 +0100
@@ -40,19 +40,23 @@
 #endif
 
 /* apic_pin_2_ir_idx[apicid][pin] = interrupt remapping table index */
-static unsigned int **apic_pin_2_ir_idx;
+static int **apic_pin_2_ir_idx;
 
 static int init_apic_pin_2_ir_idx(void)
 {
-    unsigned int *_apic_pin_2_ir_idx;
+    int *_apic_pin_2_ir_idx;
     unsigned int nr_pins, i;
+
+    /* Here we shouldn't need to re-init when resuming from S3. */
+    if ( apic_pin_2_ir_idx != NULL )
+        return 0;
 
     nr_pins = 0;
     for ( i = 0; i < nr_ioapics; i++ )
         nr_pins += nr_ioapic_registers(i);
 
-    _apic_pin_2_ir_idx = xmalloc_array(unsigned int, nr_pins);
-    apic_pin_2_ir_idx = xmalloc_array(unsigned int *, nr_ioapics);
+    _apic_pin_2_ir_idx = xmalloc_array(int, nr_pins);
+    apic_pin_2_ir_idx = xmalloc_array(int *, nr_ioapics);
     if ( (_apic_pin_2_ir_idx == NULL) || (apic_pin_2_ir_idx == NULL) )
     {
         xfree(_apic_pin_2_ir_idx);
@@ -410,7 +414,7 @@ static int msi_msg_to_remap_entry(
     struct iremap_entry *iremap_entry = NULL, *iremap_entries;
     struct iremap_entry new_ire;
     struct msi_msg_remap_entry *remap_rte;
-    unsigned int index;
+    int index;
     unsigned long flags;
     struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] vt-d: some small fixes to apic_pin_2_ir_idx, Xen patchbot-3.4-testing <=