[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86: fix off-by-one in nr_irqs_gsi calculation


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Tue, 31 Jul 2012 11:44:16 +0000
  • Delivery-date: Tue, 31 Jul 2012 11:44:24 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1343651938 -3600
# Node ID fa34499e8f6c579d20d18b308c51fc8640b7e0b3
# Parent  9908dc9808b7751f40c6c9174b70cc27842b07ae
x86: fix off-by-one in nr_irqs_gsi calculation

highest_gsi() returns the last valid GSI, not a count.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Joe Jin <joe.jin@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   25688:e6266fc76d08
xen-unstable date:        Fri Jul 27 12:22:13 2012 +0200
---


diff -r 9908dc9808b7 -r fa34499e8f6c xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Mon Jul 30 13:38:26 2012 +0100
+++ b/xen/arch/x86/io_apic.c    Mon Jul 30 13:38:58 2012 +0100
@@ -2665,7 +2665,7 @@ void __init init_ioapic_mappings(void)
         }
     }
 
-    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi());
+    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi() + 1);
 
     if ( max_gsi_irqs == 0 )
         max_gsi_irqs = nr_irqs ? nr_irqs / 8 : PAGE_SIZE;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.