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

xen-devel

[Top] [All Lists]

[Xen-devel] Re: [PATCH 12/14] xen: events: remove use of nr_irqs as uppe

To: Ian Campbell <ian.campbell@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 12/14] xen: events: remove use of nr_irqs as upper bound on number of pirqs
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: 2011年3月10日 00:33:05 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: 2011年3月09日 21:35:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1299692486-28634-12-git-send-email-ian.campbell@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: <1299692459.17339.700.camel@xxxxxxxxxxxxxxxxxxxxxx> <1299692486-28634-12-git-send-email-ian.campbell@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009年06月14日)
> int xen_irq_from_pirq(unsigned pirq)
> {
> - return pirq_to_irq[pirq];
> + int irq;
> +
> + struct irq_info *info;
> +
> + spin_lock(&irq_mapping_update_lock);
> +
> + list_for_each_entry(info, &xen_irq_list_head, list) {
> + if (info == NULL || info->type != IRQT_PIRQ)
> + continue;
> + irq = info->irq;
> + if (info->u.pirq.pirq == pirq)
> + goto out;
> + }
> + irq = -1;
> +out:
> + spin_lock(&irq_mapping_update_lock);
> +
> + return -1;
Shouldn't this be:
 return irq
?
How come you are using the spin_lock here, but not
in other places when iterating over the xen_irq_list_head?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] Re: [PATCH 11/14] xen: events: dynamically allocate irq info structures , Konrad Rzeszutek Wilk
Next by Date: [Xen-devel] [xen-4.1-testing test] 6362: regressions - FAIL , xen . org
Previous by Thread: [Xen-devel] [PATCH 12/14] xen: events: remove use of nr_irqs as upper bound on number of pirqs , Ian Campbell
Next by Thread: [Xen-devel] Re: [PATCH 12/14] xen: events: remove use of nr_irqs as upper bound on number of pirqs , Ian Campbell
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /