From: Suchit Karunakaran <suchitkarunakaran@gmail.com>
To: catalin.marinas@arm.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org,
Suchit Karunakaran <suchitkarunakaran@gmail.com>
Subject: [PATCH] arm64: allow NR_CPUS=1 for non-SMP and adjust default accordingly
Date: Thu, 24 Jul 2025 22:26:39 +0530 [thread overview]
Message-ID: <20250724165639.13926-1-suchitkarunakaran@gmail.com> (raw)
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
next reply other threads:[~2025-07-24 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 16:56 Suchit Karunakaran [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250724165639.13926-1-suchitkarunakaran@gmail.com \
--to=suchitkarunakaran@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®