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 2021/04/30 11:43:48 UTC

[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #3639: [bp-3518] arch: k210: Fix interrupt stack corruption in SMP mode

masayuki2009 commented on a change in pull request #3639:
URL: https://github.com/apache/incubator-nuttx/pull/3639#discussion_r623814199



##########
File path: arch/risc-v/src/k210/k210_head.S
##########
@@ -223,9 +223,16 @@ normal_irq:
   .type   g_intstackalloc, object
   .type   g_intstackbase, object
 g_intstackalloc:
-  .skip  (((CONFIG_ARCH_INTERRUPTSTACK * 2) & ~7))
+#ifndef CONFIG_SMP
+  .skip  ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
+#else
+  .skip  (((CONFIG_ARCH_INTERRUPTSTACK * CONFIG_SMP_NCPUS) + 4) & ~7)
+#endif
 g_intstackbase:
-  .skip  8
-  .size  g_intstackbase, 8
-  .size  g_intstackalloc, ((CONFIG_ARCH_INTERRUPTSTACK * 2) & ~7)
+  .size  g_intstackbase, 0

Review comment:
       @gustavonihei I understand that PR #3471 will not be backported to release/10.1. However, I noticed that PR #3632 (i.e. bp-3614) has the same side effects introduced in  PR #3471. So I think this PR should be merged before applying PR#3632.
   




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

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