aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@citrix.com>2013-04-16 14:38:27 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-05-10 14:54:07 +0100
commit017610862e55a31a5abb2a7e7da39ad628794e1e (patch)
treeebbe926abf4b6ab3c3ee76eb13024cc0adee2826
parent723d7bfec35f8448f324d2c3427ef76acd4271b9 (diff)
downloadxen-017610862e55a31a5abb2a7e7da39ad628794e1e.tar.gz
xen-017610862e55a31a5abb2a7e7da39ad628794e1e.tar.bz2
xen-017610862e55a31a5abb2a7e7da39ad628794e1e.zip
xen/arm: gic_disable_cpu must be called with interrupts disabled
gic_disable_cpu is only called with interrupt disabled. Use spin_lock instead of spin_lock_irq and check the function is called with interrupts disabled. Signed-off-by: Julien Grall <julien.grall@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
-rw-r--r--xen/arch/arm/gic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index dd902d293c..1e2d493e14 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -421,10 +421,12 @@ void __cpuinit gic_init_secondary_cpu(void)
/* Shut down the per-CPU GIC interface */
void gic_disable_cpu(void)
{
- spin_lock_irq(&gic.lock);
+ ASSERT(!local_irq_is_enabled());
+
+ spin_lock(&gic.lock);
gic_cpu_disable();
gic_hyp_disable();
- spin_unlock_irq(&gic.lock);
+ spin_unlock(&gic.lock);
}
void gic_route_ppis(void)