xen/arm: IRQ: move gic {, un}lock in gic_set_irq_properties
authorJulien Grall <julien.grall@linaro.org>
Tue, 22 Apr 2014 12:58:36 +0000 (13:58 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 2 May 2014 12:14:08 +0000 (13:14 +0100)
commit712aabc3a89a82ca235a2a32e780564506f3c56a
tree418ce534f12a29b670729029db98458e827073ff
parent9c4441c7bf745a60f335efceeced82749e2b3277
xen/arm: IRQ: move gic {, un}lock in gic_set_irq_properties

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 <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c