xiaoxiang781216 commented on code in PR #13886:
URL: https://github.com/apache/nuttx/pull/13886#discussion_r1792928316
##########
arch/arm/src/lc823450/lc823450_cpuindex.c:
##########
@@ -44,15 +44,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and soure code
##########
arch/arm/src/sam34/sam4cm_cpuindex.c:
##########
@@ -38,15 +38,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and soure code
##########
arch/risc-v/src/common/riscv_cpuindex.c:
##########
@@ -39,15 +39,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and source code
##########
arch/sparc/src/s698pm/s698pm_cpuindex.c:
##########
@@ -39,15 +39,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
*
****************************************************************************/
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and source code
##########
arch/xtensa/src/esp32s3/esp32s3_cpuindex.S:
##########
@@ -35,19 +35,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile
##########
arch/arm/src/rp2040/rp2040_cpuindex.c:
##########
@@ -39,15 +39,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and soure code
##########
arch/xtensa/src/esp32/esp32_cpuindex.S:
##########
@@ -35,19 +35,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
Review Comment:
ditto
##########
arch/sim/src/sim/posix/sim_hostsmp.c:
##########
@@ -165,15 +165,7 @@ void host_cpu0_start(void)
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and source code
##########
arch/arm/src/cxd56xx/cxd56_cpuindex.c:
##########
@@ -39,15 +39,7 @@
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and soure code
##########
include/nuttx/spinlock.h:
##########
@@ -531,7 +532,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile
spinlock_t *lock)
if (NULL == lock)
{
- int me = up_cpu_index();
Review Comment:
Fix all places
##########
arch/arm64/src/zynq-mpsoc/zynq_boot.c:
##########
@@ -111,19 +111,7 @@ void arm64_el_init(void)
* Name: up_cpu_index
*
* Description:
- * Return an index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
- *
- * If TLS is enabled, then the RTOS can get this information from the TLS
- * info structure. Otherwise, the MCU-specific logic must provide some
- * mechanism to provide the CPU index.
- *
- * Input Parameters:
- * None
- *
- * Returned Value:
- * An integer index in the range of 0 through (CONFIG_SMP_NCPUS-1) that
- * corresponds to the currently executing CPU.
+ * Return the real core number regardless CONFIG_SMP setting
Review Comment:
change CONFIG_SMP with CONFIG_ARCH_HAVE_MULTICPU in Makefile and source code
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]