This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a134a73692 arch/Kconfig: Make NCPUS follow SMP_NCPUS in an SMP build.
0a134a73692 is described below

commit 0a134a73692dc72555bd9eb98bcc3b7732464a69
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Nov 4 11:45:26 2026 +0100

    arch/Kconfig: Make NCPUS follow SMP_NCPUS in an SMP build.
    
    NCPUS has a prompt, so a value that is in .config stays there when
    SMP_NCPUS changes.  Change SMP_NCPUS to 2 on a configured
    qemu-armv7a:smp (with menuconfig or kconfig-tweak) and NCPUS stays at 4.
    arm_head.S then refers to cpu2_start and cpu3_start, which arm_cpuhead.S
    does not define with SMP_NCPUS=2, and the link fails.
    
    An SMP build must have NCPUS equal to SMP_NCPUS, so show the prompt only
    when SMP is off.  The value then always comes from the default.  A build
    with SMP off keeps the option, and the value in its .config.
    
    A new configuration from a defconfig is not affected: NCPUS gets its
    default from SMP_NCPUS.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 arch/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index d328a3030cd..80375e8dd7a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1076,12 +1076,12 @@ endif # ARCH_PGPOOL_MAPPING
 endif # ARCH_ADDRENV && ARCH_NEED_ADDRENV_MAPPING
 
 config NCPUS
-       int "Number of CPUs we will use"
+       int "Number of CPUs we will use" if !SMP
        default SMP_NCPUS if SMP
        default 1
        range 1 32
        ---help---
-               Number of CPUs we will use.
+               Number of CPUs we will use.  An SMP build always uses SMP_NCPUS.
 
 config PAGING
        bool "On-demand paging"

Reply via email to