Not just while saving state. Otherwise there is a race between interrupts
arriving and updating the LR state and gic_restore_state overwriting them with
the saved state.
With this change we no longer need to disable interrupts in gic_restore_state.
Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ ijc -- rewrote commit message ]
{
ctxt_switch_from(prev);
- local_irq_enable();
-
ctxt_switch_to(current);
+ local_irq_enable();
+
if ( prev != current )
update_runstate_area(current);
}
if ( is_idle_vcpu(v) )
return;
- spin_lock_irq(&gic.lock);
this_cpu(lr_mask) = v->arch.lr_mask;
for ( i=0; i<nr_lrs; i++)
GICH[GICH_LR + i] = v->arch.gic_lr[i];
- spin_unlock_irq(&gic.lock);
GICH[GICH_APR] = v->arch.gic_apr;
GICH[GICH_HCR] = GICH_HCR_EN;
isb();