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/09/27 15:46:12 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7195: armv7-a/r: SMP hande all cores start at same time
xiaoxiang781216 commented on code in PR #7195:
URL: https://github.com/apache/incubator-nuttx/pull/7195#discussion_r981416604
##########
arch/arm/src/armv7-a/arm_head.S:
##########
@@ -172,6 +172,31 @@
.type __start, #function
__start:
+#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS > 1
+ /* Get cpuindex, cpu0 continue boot, others wait event from cpu0 */
+
+ mrc CP15_MPIDR(r0)
+ and r0, r0, #0x3
+ cmp r0, #0
+ beq __cpu0_start
+ wfe
+ cmp r0, #1
+ beq __cpu1_start
+#if CONFIG_SMP_NCPUS > 2
+ cmp r0, #2
+ beq __cpu2_start
+#if CONFIG_SMP_NCPUS > 3
+ cmp r0, #3
+ beq __cpu3_start
+#if CONFIG_SMP_NCPUS > 4
+ cmp r0, #4
+ beq __cpu4_start
+#endif /* CONFIG_SMP_NCPUS > 4 */
+#endif /* CONFIG_SMP_NCPUS > 3 */
+#endif /* CONFIG_SMP_NCPUS > 2 */
+#endif /* CONFIG_SMP_NCPUS > 1 */
+
+__cpu0_start:
Review Comment:
move before line 197
--
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