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] RE: [PATCH] two more fixes for c/s 19419

To: Jan Beulich <jbeulich@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] two more fixes for c/s 19419
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Wed, 1 Apr 2009 23:43:03 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 01 Apr 2009 08:43:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49D38020.76E4.0078.0@xxxxxxxxxx>
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>
References: <49D38020.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmyyNiXBsEIJMi+TwyyEvT/m3NfcgAF6nhw
Thread-topic: [PATCH] two more fixes for c/s 19419
ACK.

On Wednesday, April 01, 2009 8:54 PM, Jan Beulich wrote:
> 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>
> 
> --- 2009-03-27.orig/xen/arch/x86/hpet.c       2009-04-01 11:28:25.000000000 
> +0200
> +++ 2009-03-27/xen/arch/x86/hpet.c    2009-04-01 14:02:18.000000000 +0200
> @@ -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]
> 
> @@ -345,6 +345,9 @@ static int hpet_assign_irq(struct hpet_e
>  {
>      unsigned int vector;
> 
> +    if ( ch->vector )
> +        return 0;
> +
>      vector = assign_irq_vector(AUTO_ASSIGN_IRQ);
>      if ( (int)vector < 0 )
>          return vector;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>