tmedicci commented on code in PR #14672: URL: https://github.com/apache/nuttx/pull/14672#discussion_r1890245947
########## arch/xtensa/src/common/xtensa_int_handlers.S: ########## @@ -197,6 +197,13 @@ _xtensa_level1_handler: call0 _xtensa_context_save + /* Overwrite the PS saved by the exception entry. */ Review Comment: This is clearing the PS.EXCM, right? If so, why? `CINTLEVEL ← max(PS.EXCM∗EXCMLEVEL,PS.INTLEVEL)` So, clearing the PS.EXCM would enable other interrupts to be served, but NuttX doesn't support nested interrupts. ########## arch/xtensa/src/common/xtensa_user_handler.S: ########## @@ -193,6 +193,13 @@ _xtensa_user_handler: mov a2, RETVAL /* a2 = address of new state save area */ + /* Set PS.EXCM to 1 */ + + movi a3, PS_EXCM_MASK + l32i a4, a2, (4 * REG_PS) + or a4, a3, a4 + s32i a4, a2, (4 * REG_PS) Review Comment: Shouldn't it be called before [`xtensa_user`](https://github.com/apache/nuttx/pull/14672/files#diff-bf4f09df2936401ec123284e73fc661258f077f216afde7bc32d2ba5706ff831R192)? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org