Call ast when handling irq from userspace, otherwise we could miss
reschedule. Right now arm_cpu_intr() does critical_exit() as the last action, so the impact is not serious. Remove duplicated interrupt disable in restore_registers macro, when returning to usermode. The do_ast macro disabled interrupts for us. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3714
This commit is contained in:
parent
15aaea7892
commit
37864a5451
@ -63,8 +63,13 @@ __FBSDID("$FreeBSD$");
|
||||
.endm
|
||||
|
||||
.macro restore_registers el
|
||||
msr daifset, #2 /* Disable interrupts, x18 may change
|
||||
* in the interrupt exception handler */
|
||||
.if \el == 1
|
||||
msr daifset, #2
|
||||
/*
|
||||
* Disable interrupts, x18 may change in the interrupt exception
|
||||
* handler. For EL0 exceptions, do_ast already did this.
|
||||
*/
|
||||
.endif
|
||||
ldp x18, lr, [sp], #16
|
||||
ldp x10, x11, [sp], #16
|
||||
.if \el == 0
|
||||
@ -155,6 +160,7 @@ handle_el0_irq:
|
||||
save_registers 0
|
||||
mov x0, sp
|
||||
bl arm_cpu_intr
|
||||
do_ast
|
||||
restore_registers 0
|
||||
eret
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user