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-unstable] x86: Fix max_gsi calculation on systems w

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix max_gsi calculation on systems with discontiguous GSI space.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Aug 2009 07:40:17 -0700
Delivery-date: Wed, 19 Aug 2009 07:41:20 -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 1250683095 -3600
# Node ID 2b8b6ee95c939089a0a7182286c9a21f0acce8fe
# Parent  61c84f478e4d00c562f66ac3b8f0613cb3a4b608
x86: Fix max_gsi calculation on systems with discontiguous GSI space.

From: Steven Smith <steven.smith@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/io_apic.c |    5 +++++
 xen/arch/x86/mpparse.c |   13 +++++++++++++
 2 files changed, 18 insertions(+)

diff -r 61c84f478e4d -r 2b8b6ee95c93 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Wed Aug 19 12:55:15 2009 +0100
+++ b/xen/arch/x86/io_apic.c    Wed Aug 19 12:58:15 2009 +0100
@@ -2349,6 +2349,8 @@ void dump_ioapic_irq_info(void)
     }
 }
 
+unsigned highest_gsi(void);
+
 void __init init_ioapic_mappings(void)
 {
     unsigned long ioapic_phys;
@@ -2390,6 +2392,9 @@ void __init init_ioapic_mappings(void)
             nr_irqs_gsi += nr_ioapic_registers[i];
         }
     }
+
+    nr_irqs_gsi = max(nr_irqs, highest_gsi());
+
     if ( !smp_found_config || skip_ioapic_setup || nr_irqs_gsi < 16 )
         nr_irqs_gsi = 16;
     else if ( nr_irqs_gsi > MAX_GSI_IRQS)
diff -r 61c84f478e4d -r 2b8b6ee95c93 xen/arch/x86/mpparse.c
--- a/xen/arch/x86/mpparse.c    Wed Aug 19 12:55:15 2009 +0100
+++ b/xen/arch/x86/mpparse.c    Wed Aug 19 12:58:15 2009 +0100
@@ -945,6 +945,19 @@ void __init mp_register_ioapic (
        return;
 }
 
+unsigned highest_gsi(void)
+{
+    unsigned x;
+    unsigned res;
+
+    res = 0;
+    for (x = 0; x < nr_ioapics; x++) {
+        if (res < mp_ioapic_routing[x].gsi_end)
+            res = mp_ioapic_routing[x].gsi_end;
+    }
+    return res;
+}
+
 
 void __init mp_override_legacy_irq (
        u8                      bus_irq,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Fix max_gsi calculation on systems with discontiguous GSI space., Xen patchbot-unstable <=