chirping78 commented on PR #14672:
URL: https://github.com/apache/nuttx/pull/14672#issuecomment-2556717623

   Here is my test results today:
   
   if removed the clearing of the `REG_PS.EXCM` from level1 handler, and from 
syscall handler (yes, both removed),
   the ostest on esp32-devkitc, esp32s2-saola-1, esp32s3-devkit all passed.
   
   But I have also tested on a hifi4 dsp, the result is:
   
   removed the clearing of the `REG_PS.EXCM` from
    (1) level1 `yes`, syscall `no`, passed
    (2) level1 `yes`, syscall `yes`, failed. Unhandled Exception 2
    (3) level1 `no`, syscall `no`,  passed
    (4) level1 `no`, syscall `yes`, failed. Unhandled Exception 2
   
   Please note that **both removed** looks right for esp32, but not for hifi4.
   
   The failed scenario for hifi4, in case (2) and (4), is:
   ***a task was interrupted by `syscall`, then later was resumed by `RFI`***. 
This is the reason clearing of the `REG_PS.EXCM` can't be removed from syscall 
handler.
   
   For the same reason, clearing of the `REG_PS.EXCM` can't be removed from 
level1 handler. Consider this scenario:
   ***a task was interrupted by level1 interrupt, then later was resumed by 
`RFI`***.
   This scenario did not appear in the tests, but it does not mean that it will 
not happen in the future.
   So the conclusion is clearing of the `REG_PS.EXCM` can not be removed from 
level1 and syscall handler.
   


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