[arch][arm64] Fix fiq support

Enable fiqs at boot, and during exceptions that can trigger a
context switch.

This fixes two problems. It avoids deadlock in code that uses spinlocks
with fiqs enabled as one cpu could be holding that spinlock and get
interrupted by an fiq, while another cpu is blocked trying to lock that
spinlock with fiqs disabled. This deadlocks if the fiq is delivered to
both these cpus and the second cpu is responsible to clearing the
interrupt.

Also, since thread_preempt can return with fiqs enabled,
regrestore_short could get interrupted by an fiq which would then
corrupt elr_el1 and spsr_el1.

Change-Id: I427f39ff94514866bf87f48393d145b7f1723502
This commit is contained in:
Arve Hjønnevåg
2015-05-29 19:21:09 -07:00
committed by Travis Geiselbrecht
parent 586fe3d831
commit bd052a3507
3 changed files with 7 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ static void arm64_cpu_early_init(void)
if (current_el > 1) {
arm64_el3_to_el1();
}
arch_enable_fiqs();
}
void arch_early_init(void)