From: Ian Campbell Subject: Re: [PATCH for-4.5 1/8] xen/arm: irq: move gic {, un}lock in gic_set_irq_properties Date: Wed, 19 Feb 2014 11:23:15 +0000 Message-ID: <1392808995.23084.139.camel@kazak.uk.xensource.com> References: <1390581822-32624-1-git-send-email-julien.grall@linaro.org> <1390581822-32624-2-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WG5FI-0004K6-I6 for xen-devel@lists.xenproject.org; Wed, 19 Feb 2014 11:23:20 +0000 In-Reply-To: <1390581822-32624-2-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-01-24 at 16:43 +0000, Julien Grall wrote: > The function gic_set_irq_properties is only called in two places: > - gic_route_irq: the gic.lock is only taken for the call to the > former function. > - gic_route_irq_to_guest: the gic.lock is taken for the duration of > the function. But the lock is only useful when gic_set_irq_properties. > > So we can safely move the lock in gic_set_irq_properties and restrict the > critical section for the gic.lock in gic_route_irq_to_guest. > > Signed-off-by: Julien Grall Acked-by: Ian Campbell Although ISTR Stefano saying he had got rid of the lock altogether. I'll let you to battle that one out ;-)