You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/17 11:58:17 UTC

[GitHub] [incubator-nuttx] jlaitine commented on a change in pull request #5247: Mpfs switch to exception common

jlaitine commented on a change in pull request #5247:
URL: https://github.com/apache/incubator-nuttx/pull/5247#discussion_r785918264



##########
File path: arch/risc-v/src/common/riscv_exception_common.S
##########
@@ -99,15 +101,14 @@ exception_common:
   csrr s0, mhartid
 
   /* Switch to interrupt stack */
-
-  bnez s0, 1f
-  la   sp, g_intstacktop
-  j    2f
-1:
-  la   sp, g_intstacktop
-  li   t0, -(CONFIG_ARCH_INTERRUPTSTACK & ~15)
-  add  sp, sp, t0
-2:
+#if CONFIG_N_IRQ_STACKS > 1
+  li t0, ((CONFIG_ARCH_INTERRUPTSTACK) & ~15)

Review comment:
       better have parenthesis, just in case someone goes and types "CONFIG_ARCH_INTERRUPTSTACK=2048+1024" or such in his .config file.




-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org