sdc-g commented on PR #15985:
URL: https://github.com/apache/nuttx/pull/15985#issuecomment-2728858391

   Hi @chirping78 
   
   thanks so much for your comment.
   
   > To prevent the resuming action be interrupted, REG_PS.EXCM is set to 1 
[here](https://github.com/apache/nuttx/blob/master/arch/xtensa/src/common/xtensa_user_handler.S#L317)
 and 
[here](https://github.com/apache/nuttx/blob/master/arch/xtensa/src/common/xtensa_int_handlers.S#L224)
   
   I'm so sorry, I do NOT enough check the latest Nuttx code. I am working at 
branched version around 12.5.
   Actually, I also provide one similar assembly code change internally. So I 
think, by using your changes, the issue also can fixed. But let me try to 
reproduce and double confirm.
   
   > If new task be resumed by level2 and above: rfi will restores the PS from 
EPS[N] and jump to the address in EPC[N]. Problem will be here, after the new 
task be resumed, the PS.EXCM bit is still set. If window rotation related 
instruction is executed, error will arise.
   
   This PR changes the initial value of PS.EXCM. While high level interrupt, 
e.g., swint as level 3 to switch to the new thread, what is the value of its 
EPS_3? PS.EXCM is cleared 
[here](https://github.com/apache/nuttx/blob/master/arch/xtensa/src/common/xtensa_swint.c#L387):


-- 
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

Reply via email to