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

Re: [Xen-devel] [GIT PULL] pv/pcifront-2.6.32

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [GIT PULL] pv/pcifront-2.6.32
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 2 Mar 2010 14:45:53 +0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 02 Mar 2010 06:46:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100302135521.GB25893@xxxxxxxxxxxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <20100302031217.GB881@xxxxxxxxxxxxxxxxxxx> <1267521715.11737.23106.camel@xxxxxxxxxxxxxxxxxxxxxx> <20100302135521.GB25893@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2010-03-02 at 13:55 +0000, Konrad Rzeszutek Wilk wrote:
> On Tue, Mar 02, 2010 at 09:21:55AM +0000, Ian Campbell wrote:
> > On Tue, 2010-03-02 at 03:12 +0000, Konrad Rzeszutek Wilk wrote:
> > > 
> > > Ian Campbell (1):
> > >       xen: fix off-by-one error in find_unbound_irq 
> > 
> > You need to add this commit if you include the above:
> 
> I merged both patches and joined the  description.
> This is what I have (I hope this is OK?):

Fine with me, thanks.

Ian.

> 
> 
> commit bfbc226dc3473b49d6a8721ca8f6457e6fa1c690
> Author: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> Date:   Mon Mar 1 13:07:18 2010 +0000
> 
>     xen: fix off-by-one error in find_unbound_irq
>     
>     68458a36 "fix off-by-one error in find_unbound_irq" introduced an issue 
> with
>     the error handling in this function. It incorrectly assumed that exiting 
> the
>     searhc loop with irq == nr_irqs - 1 was an error case when in fact it is
>     prefectly possible for irq == nr_irqs - 1 to be an available IRQ.
>     
>     The actual error condition which 68458a36 tried to fix is when start ==
>     nr_irqs, IOW when there is literaly no interrupts which aren't already h/w
>     interrupts.
>     
>     Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>      drivers/xen/events.c |   10 ++++++++--
>      1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index c75614b..be9ad7f 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
> @@ -363,13 +363,16 @@ static int find_unbound_irq(void)
>       struct irq_desc *desc;
>       int start = get_nr_hw_irqs();
>  
> +     if (start == nr_irqs)
> +             goto no_irqs;
> +
>       /* nr_irqs is a magic value. Must not use it.*/
>       for (irq = nr_irqs-1; irq > start; irq--)
>               if (irq_info[irq].type == IRQT_UNBOUND)
>                       break;
>  
> -     if (irq == start || irq == nr_irqs)
> -             panic("No available IRQ to bind to: increase nr_irqs!\n");
> +     if (irq == start)
> +             goto no_irqs;
>  
>       desc = irq_to_desc_alloc_node(irq, 0);
>       if (WARN_ON(desc == NULL))
> @@ -378,6 +381,9 @@ static int find_unbound_irq(void)
>       dynamic_irq_init(irq);
>  
>       return irq;
> +
> +no_irqs:
> +     panic("No available IRQ to bind to: increase nr_irqs!\n");
>  }
>  
>  static bool identity_mapped_irq(unsigned irq)
> > 
> > commit 716645983e03118d11924cc245cd63fd67c6bfa8
> > Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > Date:   Mon Mar 1 12:06:15 2010 +0000
> > 
> >     xen: fix error handling in in find_unbound_irq
> >     
> >     68458a36 "fix off-by-one error in find_unbound_irq" introduced an issue 
> > with
> >     the error handling in this function. It incorrectly assumed that 
> > exiting the
> >     searhc loop with irq == nr_irqs - 1 was an error case when in fact it is
> >     prefectly possible for irq == nr_irqs - 1 to be an available IRQ.
> >     
> >     The actual error condition which 68458a36 tried to fix is when start ==
> >     nr_irqs, IOW when there is literaly no interrupts which aren't already 
> > h/w
> >     interrupts.
> > 
> > 
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel



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