From: Ian Campbell Subject: Re: [PATCH] xen/arm: pass a struct pending_irq* as parameter to gic helper functions Date: Tue, 7 Jan 2014 12:01:29 +0000 Message-ID: <1389096089.31766.140.camel@kazak.uk.xensource.com> References: <1387461038.9925.77.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1387461038.9925.77.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, 2013-12-19 at 13:50 +0000, Ian Campbell wrote: > On Tue, 2013-12-17 at 16:16 +0000, Stefano Stabellini wrote: > > gic_add_to_lr_pending and gic_set_lr should take a struct pending_irq* > > as parameter instead of the virtual_irq number and the priority > > separately and doing yet another irq_to_pending lookup. > > > > Signed-off-by: Stefano Stabellini > > Acked-by: Ian Campbell > > What do you think about this one for 4.4? It whiffs a bit of a cleanup > rather than a bug fix (unless e.g. there is some subtle incorrectness in > the priority which was getting passed around before, rather than just > the potential for it) Unless there is an actual bug fixed by this I think I'll leave it for 4.5 > > > > @@ -672,12 +670,12 @@ void gic_set_guest_irq(struct vcpu *v, unsigned int virtual_irq, > > i = find_first_zero_bit(&this_cpu(lr_mask), nr_lrs); > > if (i < nr_lrs) { > > set_bit(i, &this_cpu(lr_mask)); > > - gic_set_lr(i, virtual_irq, state, priority); > > + gic_set_lr(i, irq_to_pending(v, virtual_irq), state); > > goto out; > > } > > } > > > > - gic_add_to_lr_pending(v, virtual_irq, priority); > > + gic_add_to_lr_pending(v, irq_to_pending(v, virtual_irq)); > > I think you could take this one step further and make a similar change > to gic_set_guest_irq, the only caller has the pending_irq * in its hand > already. > > Ian. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel