lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250724165639.13926-1-suchitkarunakaran@gmail.com>
Date: Thu, 24 Jul 2025 22:26:39 +0530
From: Suchit Karunakaran <suchitkarunakaran@...il.com>
To: catalin.marinas@....com,
	will@...nel.org,
	linux-arm-kernel@...ts.infradead.org
Cc: skhan@...uxfoundation.org,
	linux-kernel-mentees@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Suchit Karunakaran <suchitkarunakaran@...il.com>
Subject: [PATCH] arm64: allow NR_CPUS=1 for non-SMP and adjust default accordingly

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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ