davids5 commented on a change in pull request #4020: URL: https://github.com/apache/incubator-nuttx/pull/4020#discussion_r662531394
########## File path: sched/Kconfig ########## @@ -268,13 +268,25 @@ config SMP default n depends on ARCH_HAVE_MULTICPU depends on ARCH_HAVE_TESTSET + depends on ARCH_INTERRUPTSTACK != 0 select SPINLOCK select SCHED_RESUMESCHEDULER select IRQCOUNT ---help--- Enables support for Symmetric Multi-Processing (SMP) on a multi-CPU platform. + SMP mode must work with ARCH_INTERRUPTSTACK, here is the fail case: + + CPU0 thread0 -> IRQ enter -> add thread0 to block_list -> IRQ leave(crash) + || + /\ + / \ + CPU1 thread1 -> block_task -> take thread0 from block_list -> run thread0 + + CPU0 IRQ handler use thread0's stack, but thread0 may switch to CPU1, that + will caused IRQ handler stack curroption. Review comment: I think the above information is important, but if ARCH_INTERRUPTSTACK is not it will not be seen. The information needs to be in the Documentation. ########## File path: sched/Kconfig ########## @@ -268,13 +268,25 @@ config SMP default n depends on ARCH_HAVE_MULTICPU depends on ARCH_HAVE_TESTSET + depends on ARCH_INTERRUPTSTACK != 0 select SPINLOCK select SCHED_RESUMESCHEDULER select IRQCOUNT ---help--- Enables support for Symmetric Multi-Processing (SMP) on a multi-CPU platform. + SMP mode must work with ARCH_INTERRUPTSTACK, here is the fail case: Review comment: ```suggestion N.B. SMP mode requires the use of ARCH_INTERRUPTSTACK ``` -- 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