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 07:35:13 UTC

[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request, #7195: armv7-a/r: SMP hande all cores start at same time

GUIDINGLI opened a new pull request, #7195:
URL: https://github.com/apache/incubator-nuttx/pull/7195

   ## Summary
   
   armv7-a/r: SMP hande all cores start at same time
   
   In SMP mode, if all cores start at same time, all from __start(), then only primary need do initialize, so others core should wait primary, use this function let the non-primary continue to run __cpuN_start().
   
   Signed-off-by: ligd <li...@xiaomi.com>
   
   
   ## Impact
   
   SMP
   
   ## Testing
   
   VELA


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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7195: armv7-a/r: SMP hande all cores start at same time

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [incubator-nuttx] masayuki2009 merged pull request #7195: armv7-a/r: SMP hande all cores start at same time

Posted by GitBox <gi...@apache.org>.
masayuki2009 merged PR #7195:
URL: https://github.com/apache/incubator-nuttx/pull/7195


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


[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #7195: armv7-a/r: SMP hande all cores start at same time

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7195:
URL: https://github.com/apache/incubator-nuttx/pull/7195#issuecomment-1259341010

   @GUIDINGLI 
   
   ```
   ====================================================================================
   Configuration/Tool: launchxl-tms57004/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
   ------------------------------------------------------------------------------------
     Cleaning...
     Configuring...
     Disabling CONFIG_ARM_TOOLCHAIN_BUILDROOT
     Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
     Building NuttX...
   Error: armv7-r/arm_head.S:375:5: error: "CONFIG_SMP_NCPUS" is not defined, evaluates to 0 [-Werror=undef]
     375 | #if CONFIG_SMP_NCPUS > 1
         |     ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   make[1]: *** [Makefile:140: arm_head.o] Error 1
   make[1]: Target 'libarch.a' not remade because of errors.
   make: *** [tools/LibTargets.mk:152: arch/arm/src/libarch.a] Error 2
   make: Target 'all' not remade because of errors.
   ```
   


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


[GitHub] [incubator-nuttx] GUIDINGLI commented on pull request #7195: armv7-a/r: SMP hande all cores start at same time

Posted by GitBox <gi...@apache.org>.
GUIDINGLI commented on PR #7195:
URL: https://github.com/apache/incubator-nuttx/pull/7195#issuecomment-1259105266

   @masayuki2009 
   Can you help to review this ?


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