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 11/14] xen: events: dynamically allocate irq info

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 11/14] xen: events: dynamically allocate irq info structures
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Thu, 10 Mar 2011 08:51:31 +0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 10 Mar 2011 00:52:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110310052747.GC10574@xxxxxxxxxxxx>
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: <1299692459.17339.700.camel@xxxxxxxxxxxxxxxxxxxxxx> <1299692486-28634-11-git-send-email-ian.campbell@xxxxxxxxxx> <20110310052747.GC10574@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-03-10 at 05:27 +0000, Konrad Rzeszutek Wilk wrote:
> > @@ -649,10 +653,9 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi,
> >  
> >     spin_lock(&irq_mapping_update_lock);
> >  
> > -   if ((pirq > nr_irqs) || (gsi > nr_irqs)) {
> > -           printk(KERN_WARNING "xen_map_pirq_gsi: %s %s is incorrect!\n",
> > -                   pirq > nr_irqs ? "pirq" :"",
> > -                   gsi > nr_irqs ? "gsi" : "");
> > +   if (pirq > nr_irqs) {
> > +           printk(KERN_WARNING "xen_map_pirq_gsi: pirq %d > nr_irqs %d!\n",
> > +                  pirq, nr_irqs);
> 
> Looks like this belongs to another patch?

To be honest I'm not entirely sure what that check was protecting
anyway. Possibly it comes from a time when the GSI<->IRQ was 1-1 and
prevented us from spilling off the end of the irq_info array.

It may be that it is safe to have gsi > nr_irqs in an earlier patch in
this series (possibly "xen: events: maintain a list of Xen interrupts")
or even in one of my earlier series which switched to using the core
interrupt allocation logic and/or removed the 1-1 mapping above
nr_irqs_gsi in certain cases.

Anyway, this is the first patch where I'm pretty sure it is safe to
allow GSI > nr_irqs since there are no nr_irqs based limitations left
apart from the pirq one.

Ian.


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

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