[PATCH] arm64: allow NR_CPUS=1 for non-SMP and adjust default accordingly
Anshuman Khandual
anshuman.khandual at arm.com
Thu Jul 24 19:16:08 PDT 2025
On 24/07/25 10:26 PM, Suchit Karunakaran wrote:
> The arm64 Kconfig for NR_CPUS previously required a minimum of 2 CPUs.
> This patch changes the minimum allowed CPUs to 1, enabling single-core
> non-SMP configurations.
>
> Additionally, the default value for NR_CPUS is now conditional:
> - Defaults to 1 if SMP is not selected (non-SMP systems)
> - Defaults to 512 if SMP is enabled
Just curious - what actually prompted this change ?
>
> Signed-off-by: Suchit Karunakaran <suchitkarunakaran at gmail.com>
> ---
> arch/arm64/Kconfig | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 393d71124f5d..9b2970f7c5ec 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1528,9 +1528,10 @@ config SCHED_SMT
> places. If unsure say N here.
>
> config NR_CPUS
> - int "Maximum number of CPUs (2-4096)"
> - range 2 4096
> - default "512"
> + int "Maximum number of CPUs (1-4096)"
> + range 1 4096
> + default "1" if !SMP
> + default "512" if SMP
>
> config HOTPLUG_CPU
> bool "Support for hot-pluggable CPUs"
More information about the linux-arm-kernel
mailing list