linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: allow NR_CPUS=1 for non-SMP and adjust default accordingly
@ 2025-07-24 16:56 Suchit Karunakaran
  2025-07-25  2:16 ` Anshuman Khandual
  2025-07-25  8:36 ` Catalin Marinas
  0 siblings, 2 replies; 5+ messages in thread
From: Suchit Karunakaran @ 2025-07-24 16:56 UTC (permalink / raw)
  To: catalin.marinas, will, linux-arm-kernel
  Cc: skhan, linux-kernel-mentees, linux-kernel, Suchit Karunakaran

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

Signed-off-by: Suchit Karunakaran <suchitkarunakaran@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"
-- 
2.50.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-25  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 16:56 [PATCH] arm64: allow NR_CPUS=1 for non-SMP and adjust default accordingly Suchit Karunakaran
2025-07-25  2:16 ` Anshuman Khandual
2025-07-25  4:06   ` Suchit K
2025-07-25  8:36 ` Catalin Marinas
2025-07-25  8:42   ` Suchit K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).