Skip to contentSkip to conversation

arm: fix gic_init_secondary_cpu.

PATCH In review Ian Campbell 2 participants 3 messages Aug 1, 2012 – Aug 3, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: fix gic_init_secondary_cpu.

Using spin_lock_irq here is unnecessary (interrupts are not yet enabled) and wrong (since they will get unexpectedly renabled by spin_unlock_irq).

We can just use spin_lock/spin_unlock.

---

Now an SMP model gets as far as hanging at dom0 "Calibrating delay loop...".

Tim, didn't you diagnose that a while ago?

---
 xen/arch/arm/gic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/gic.c +2 -2
index 378158b..6f5b0e1 100644
@@ -323,10 +323,10 @@ int __init gic_init(void)
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
 void __cpuinit gic_init_secondary_cpu(void)
 {
-    spin_lock_irq(&gic.lock);
+    spin_lock(&gic.lock);
     gic_cpu_init();
     gic_hyp_init();
-    spin_unlock_irq(&gic.lock);
+    spin_unlock(&gic.lock);
 }
 
 /* Shut down the per-CPU GIC interface */
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Ian Campbell

Using spin_lock_irq here is unnecessary (interrupts are not yet enabled) and wrong (since they will get unexpectedly renabled by spin_unlock_irq).

We can just use spin_lock/spin_unlock.

Quoted 3 lines

Now an SMP model gets as far as hanging at dom0 "Calibrating delay loop...".

Tim, didn't you diagnose that a while ago?

I only got as far as showing that dom0 is spinning waiting for jiffies to increase, but never taking the timer interrupts that would cause that to happen.

Tim.