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 hpet: two more fixes for c/s 19419

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hpet: two more fixes for c/s 19419
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:02:57 -0700
Delivery-date: Tue, 07 Apr 2009 23:07:19 -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 1238591086 -3600
# Node ID 4da7f15e91262866bc6b0cdfee8883f4d2810955
# Parent  2491158ccd173786590340cbcf77985f66cd2b8f
x86 hpet: two more fixes for c/s 19419

vector_channel[], as its name already says, is vector-, not
irq-indexed.

hpet_assign_irq() sits not only in the boot path, but also in the
resume one. Short of knowing why this is, simply checking whether a
vector was already assigned prevents leaking previously assigned ones.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/hpet.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r 2491158ccd17 -r 4da7f15e9126 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Wed Apr 01 13:49:35 2009 +0100
+++ b/xen/arch/x86/hpet.c       Wed Apr 01 14:04:46 2009 +0100
@@ -45,7 +45,7 @@ static unsigned int num_hpets_used; /* m
 
 DEFINE_PER_CPU(struct hpet_event_channel *, cpu_bc_channel);
 
-static int vector_channel[NR_IRQS] = {[0 ... NR_IRQS-1] = -1};
+static int vector_channel[NR_VECTORS] = {[0 ... NR_VECTORS-1] = -1};
 
 #define vector_to_channel(vector)   vector_channel[vector]
 
@@ -344,6 +344,9 @@ static int hpet_assign_irq(struct hpet_e
 static int hpet_assign_irq(struct hpet_event_channel *ch)
 {
     int vector;
+
+    if ( ch->vector )
+        return 0;
 
     if ( (vector = assign_irq_vector(AUTO_ASSIGN_IRQ)) < 0 )
         return vector;

_______________________________________________
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 hpet: two more fixes for c/s 19419, Xen patchbot-unstable <=