diff --git a/sys/mips/mips/exception.S b/sys/mips/mips/exception.S index 1d511ee74315..262701eb124e 100644 --- a/sys/mips/mips/exception.S +++ b/sys/mips/mips/exception.S @@ -727,6 +727,18 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE, ra) jalr k0 sw a3, STAND_RA_OFFSET(sp) # for debugging +/* + * Enable interrupts before doing ast(). + * + * On SMP kernels the AST processing might trigger IPI to other processors. + * If that processor is also doing AST processing with interrupts disabled + * then we may deadlock. + */ + mfc0 a0, COP_0_STATUS_REG + or a0, a0, SR_INT_ENAB + mtc0 a0, COP_0_STATUS_REG + ITLBNOPFIX + /* * DO_AST enabled interrupts */